diff --git a/docs/installation/installation_docker.md b/docs/installation/installation_docker.md index b7048169..391e1e03 100644 --- a/docs/installation/installation_docker.md +++ b/docs/installation/installation_docker.md @@ -95,6 +95,11 @@ services: docker-compose up -d ``` +{: .warning } +> If you run a root console inside the docker container, and wanna execute commands on the webserver behalf, be sure to use `sudo -E` command (with the `-E` flag) to preserve env variables from the current shell. +> Otherwise Part-DB console might use the wrong configuration to execute commands. + + 6. Create the initial database with ```bash diff --git a/docs/upgrade/1_to_2.md b/docs/upgrade/1_to_2.md index ef0f4575..6cd4a3e4 100644 --- a/docs/upgrade/1_to_2.md +++ b/docs/upgrade/1_to_2.md @@ -60,6 +60,8 @@ The `php bin/console partdb:backup` command can help you with this. If you want to change them, you must migrate them to the settings interface as described below. ### Docker installation +**When running the console commands from inside a docker container's shell as root, be sure to use `sudo -E` to preserve the environment variables, so that they are correctly passed to the command.** + 1. Make a backup of your existing Part-DB installation, including the database, data directories and the configuration files and the file where you configure the docker environment variables. 2. Stop the existing Part-DB container with `docker compose down` 3. Ensure that your docker compose file uses the new latest images (either `latest` or `2` tag).