diff --git a/.examples/docker-compose/insecure/mariadb/apache/compose.yaml b/.examples/docker-compose/insecure/mariadb/apache/compose.yaml index daa51590..4d0fd8fd 100644 --- a/.examples/docker-compose/insecure/mariadb/apache/compose.yaml +++ b/.examples/docker-compose/insecure/mariadb/apache/compose.yaml @@ -23,7 +23,6 @@ services: - 127.0.0.1:8080:80 volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - MYSQL_HOST=db - REDIS_HOST=redis @@ -38,7 +37,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db diff --git a/.examples/docker-compose/insecure/mariadb/fpm/compose.yaml b/.examples/docker-compose/insecure/mariadb/fpm/compose.yaml index 25e5b717..06b12afb 100644 --- a/.examples/docker-compose/insecure/mariadb/fpm/compose.yaml +++ b/.examples/docker-compose/insecure/mariadb/fpm/compose.yaml @@ -21,7 +21,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - MYSQL_HOST=db - REDIS_HOST=redis @@ -38,7 +37,6 @@ services: - 127.0.0.1:8080:80 volumes: - nextcloud:/var/www/html:z,ro - # NOTE: The `volumes` included here should match those of the `app` container (unless you know what you're doing) depends_on: - app @@ -47,7 +45,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db diff --git a/.examples/docker-compose/insecure/postgres/apache/compose.yaml b/.examples/docker-compose/insecure/postgres/apache/compose.yaml index 19c75ba4..646261d0 100644 --- a/.examples/docker-compose/insecure/postgres/apache/compose.yaml +++ b/.examples/docker-compose/insecure/postgres/apache/compose.yaml @@ -18,7 +18,6 @@ services: - 127.0.0.1:8080:80 volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - POSTGRES_HOST=db - REDIS_HOST=redis @@ -33,7 +32,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db @@ -41,4 +39,4 @@ services: volumes: db: - nextcloud: + nextcloud: \ No newline at end of file diff --git a/.examples/docker-compose/insecure/postgres/fpm/compose.yaml b/.examples/docker-compose/insecure/postgres/fpm/compose.yaml index 4e268cab..b5071d5c 100644 --- a/.examples/docker-compose/insecure/postgres/fpm/compose.yaml +++ b/.examples/docker-compose/insecure/postgres/fpm/compose.yaml @@ -16,7 +16,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - POSTGRES_HOST=db - REDIS_HOST=redis @@ -33,7 +32,6 @@ services: - 127.0.0.1:8080:80 volumes: - nextcloud:/var/www/html:z,ro - # NOTE: The `volumes` included here should match those of the `app` container (unless you know what you're doing) depends_on: - app @@ -42,7 +40,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db diff --git a/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml b/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml index 2a0d57a5..7a221407 100644 --- a/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml +++ b/.examples/docker-compose/with-nginx-proxy/mariadb/apache/compose.yaml @@ -21,7 +21,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - VIRTUAL_HOST= - LETSENCRYPT_HOST= @@ -46,7 +45,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db diff --git a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml index 20db19a9..ff7a5388 100644 --- a/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml +++ b/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/compose.yaml @@ -21,7 +21,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - MYSQL_HOST=db - REDIS_HOST=redis @@ -37,7 +36,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z,ro - # NOTE: The `volumes` included here should match those of the `app` container (unless you know what you're doing) environment: - VIRTUAL_HOST= - LETSENCRYPT_HOST= @@ -53,7 +51,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db diff --git a/.examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml b/.examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml index 2eb4f638..a3dece4b 100644 --- a/.examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml +++ b/.examples/docker-compose/with-nginx-proxy/postgres/apache/compose.yaml @@ -16,7 +16,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - VIRTUAL_HOST= - LETSENCRYPT_HOST= @@ -38,7 +37,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db diff --git a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/compose.yaml b/.examples/docker-compose/with-nginx-proxy/postgres/fpm/compose.yaml index 80be65a6..09a80e7d 100644 --- a/.examples/docker-compose/with-nginx-proxy/postgres/fpm/compose.yaml +++ b/.examples/docker-compose/with-nginx-proxy/postgres/fpm/compose.yaml @@ -18,7 +18,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match environment: - POSTGRES_HOST=db - REDIS_HOST=redis @@ -34,7 +33,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z,ro - # NOTE: The `volumes` included here should match those of the `app` container (unless you know what you're doing) environment: - VIRTUAL_HOST= - LETSENCRYPT_HOST= @@ -50,7 +48,6 @@ services: restart: always volumes: - nextcloud:/var/www/html:z - # NOTE: The `volumes` config of the `cron` and `app` containers must match entrypoint: /cron.sh depends_on: - db diff --git a/README.md b/README.md index 25668109..bbe7ee7b 100644 --- a/README.md +++ b/README.md @@ -128,8 +128,7 @@ 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 (`occ`) - +## Using the Nextcloud command-line interface 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 @@ -138,23 +137,6 @@ 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!