mirror of
https://github.com/nextcloud/docker.git
synced 2025-05-03 07:30:53 +02:00
Merge branch 'nextcloud:master' into volume-clarification
This commit is contained in:
commit
a82394557c
31 changed files with 111 additions and 69 deletions
24
README.md
24
README.md
|
@ -128,7 +128,8 @@ If mounting additional volumes under `/var/www/html`, you should consider:
|
|||
You should note that data inside the main folder (`/var/www/html`) will be overridden/removed during installation and upgrades, unless listed in [upgrade.exclude](https://github.com/nextcloud/docker/blob/master/upgrade.exclude). The additional volumes officially supported are already in that list, but custom volumes will need to be added by you. We suggest mounting custom storage volumes outside of `/var/www/html` and if possible read-only so that making this adjustment is unnecessary. If you must do so, however, you may build a custom image with a modified `/upgrade.exclude` file that incorporates your custom volume(s).
|
||||
|
||||
|
||||
## Using the Nextcloud command-line interface
|
||||
## Using the Nextcloud command-line interface (`occ`)
|
||||
|
||||
To use the [Nextcloud command-line interface](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html) (aka. `occ` command):
|
||||
```console
|
||||
$ docker exec --user www-data CONTAINER_ID php occ
|
||||
|
@ -137,6 +138,23 @@ or for docker compose:
|
|||
```console
|
||||
$ docker compose exec --user www-data app php occ
|
||||
```
|
||||
or even shorter:
|
||||
```console
|
||||
$ docker compose exec -u33 app ./occ
|
||||
```
|
||||
Note: substitute `82` for `33` if using the Alpine-based images.
|
||||
|
||||
## Viewing the Nextcloud configuration (`config.php`)
|
||||
|
||||
The image takes advantage of Nextcloud's [Multiple config.php support](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/config_sample_php_parameters.html#multiple-config-php-file) to inject auto configuration environment variables and set image specific config values.
|
||||
|
||||
This means that merely viewing your `config.php` will not give you an accurate view of your running config. Instead, you should use Nextcloud's [`occ config:list system` command](https://docs.nextcloud.com/server/latest/admin_manual/occ_command.html#config-commands-label) to get get a complete view of your merged configuration. This has the added benefit of automatically omitting sensitive values such as passwords and secrets from the output by default (e.g. useful for shared publicly or assisting others when troubleshooting or reporting a bug).
|
||||
|
||||
```console
|
||||
$ docker compose exec -u33 app ./occ config:list system
|
||||
```
|
||||
|
||||
The `--private` flag can also be specified, in order to output all configuration values including passwords and secrets.
|
||||
|
||||
## Auto configuration via environment variables
|
||||
The Nextcloud image supports auto configuration via environment variables. You can preconfigure everything that is asked on the install page on first run. To enable auto configuration, set your database connection via the following environment variables. You must specify all of the environment variables for a given database or the database environment variables defaults to SQLITE. ONLY use one database type!
|
||||
|
@ -249,6 +267,10 @@ During a fresh Nextcloud installation, the latest version (from the image) of th
|
|||
The copied files, however, are **not** automatically overwritten whenever you update your environment with a newer Nextcloud image. This is to prevent local changes in `/var/www/html/config` from being unexpectedly overwritten. This may lead to your image-specific configuration files becoming outdated and image functionality not matching that which is documented.
|
||||
|
||||
A warning will be generated in the container log output when outdated image-specific configuration files are detected at startup in a running container. When you see this warning, you should manually compare (or copy) the files from `/usr/src/nextcloud/config` to `/var/www/html/config`.
|
||||
A command to copy these configs would e.g. be:
|
||||
```console
|
||||
docker exec <container-name> sh -c "cp /usr/src/nextcloud/config/*.php /var/www/html/config"
|
||||
```
|
||||
|
||||
As long as you have not modified any of the provided config files in `/var/www/html/config` (other than `config.php`) or only added new ones with names that do not conflict with the image specific ones, copying the new ones into place should be safe (but check the source path `/usr/src/nextcloud/config` for any newly named config files to avoid new overlaps just in case).
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue