From 45591853363089a453ffff4d05c4f7024c9304cb Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Thu, 14 Sep 2017 17:28:12 +0200 Subject: [PATCH] [Nextcloud] Added readme entry for auto config nextcloud/docker#153 --- nextcloud/content.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/nextcloud/content.md b/nextcloud/content.md index 0a4d489e8..a9efb973f 100644 --- a/nextcloud/content.md +++ b/nextcloud/content.md @@ -94,6 +94,38 @@ or for docker-compose: $ docker-compose exec --user www-data app php occ ``` +## 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. ONLY use one database type! + +**SQLITE_DATABASE**: + +- `SQLITE_DATABASE` Name of the database using sqlite + +**MYSQL/MariaDB**: + +- `MYSQL_DATABASE` Name of the database using mysql / mariadb. +- `MYSQL_USER` Username for the database using mysql / mariadb. +- `MYSQL_PASSWORD` Password for the database user using mysql / mariadb. +- `MYSQL_HOST` Hostname of the database server using mysql / mariadb. + +**PostgreSQL**: + +- `POSTGRES_DB` Name of the database using postgres. +- `POSTGRES_USER` Username for the database using postgres. +- `POSTGRES_PASSWORD` Password for the database user using postgres. +- `POSTGRES_HOST` Hostname of the database server using postgres. + +If you set any values, they will not be asked in the install page on first run. With a complete configuration by using all variables for your database type, you can additionally configure your Nextcloud instance by setting admin user and password (only works if you set both): + +- `NEXTCLOUD_ADMIN_USER` Name of the Nextcloud admin user. +- `NEXTCLOUD_ADMIN_PASSWORD` Password for the Nextcloud admin user. + +If you want you can set the data directory and table prefix, otherwise default values will be used. + +- `NEXTCLOUD_DATA_DIR` (default: */var/www/html/data*) Configures the data directory where nextcloud stores all files from the users. +- `NEXTCLOUD_TABLE_PREFIX` (default: *""*) Optional prefix for the tables. Used to be `oc_` in the past + # Running this image with docker-compose The easiest way to get a fully featured and functional setup is using a `docker-compose` file. There are too many different possibilities to setup your system, so here are only some examples what you have to look for.