From c6995f135eeeb4edcdacf3e7a76a134615610e4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Br=C3=BCckner?= Date: Thu, 14 Sep 2017 15:14:29 +0200 Subject: [PATCH 1/3] Added readme entry for auto config --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index a859899..87c08e4 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,35 @@ or for docker-compose: $ docker-compose exec --user www-data app php occ ``` +## Auto configuration via envorinment 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. From 4fd6a1186c476ddcf018d96dac7453428cb5edee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Br=C3=BCckner?= Date: Thu, 14 Sep 2017 15:17:30 +0200 Subject: [PATCH 2/3] Style fix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 87c08e4..f68b289 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ The nextcloud image supports auto configuration via environment variables. You c __SQLITE_DATABASE__: - `SQLITE_DATABASE` Name of the database using sqlite -___MYSQL/MariaDB__: +__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. From 01a12b18f65a00821cf571a584738a058ef2b891 Mon Sep 17 00:00:00 2001 From: Tilo Spannagel Date: Thu, 14 Sep 2017 15:25:35 +0200 Subject: [PATCH 3/3] Fix Typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f68b289..f3784ec 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ or for docker-compose: $ docker-compose exec --user www-data app php occ ``` -## Auto configuration via envorinment variables +## 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__: