Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md - specify envs are not read after installation #2085

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,22 @@ Check the [Nexcloud documentation](https://docs.nextcloud.com/server/latest/admi

Keep in mind that once set, removing these environment variables won't remove these values from the configuration file, due to how Nextcloud merges configuration files together.

## Changing database connection options after installation

At installation time, the values are taken from the environment variables above and saved into the `config.php` file. Changing these envrionment variables after installation will not change the `config.php` file, and will not be picked up at runtime.

If one of these values needs to change, for example `MYSQL_HOST`, one must either manually edit the `config.php` file, or create a new custom configuration file (for example, `config/dbhostoverride.config.php`) with content:

```
<?php
$CONFIG = array (
'dbhost' => getenv('MYSQL_HOST'),
);
```

And add keys to this file for each value expected to change (dbhost, dbport, passwords, etc).


# 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 of what you have to look for.

Expand Down