You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy-datadir container was born because we use a script called envsubst which allow injecting environment variables in the config files that do not support environment variables. Let's say you want to avoid storing some database credentials in git, so you use an env, but the application does not support envs. So we had to use envsubst to replace the specific string with the env BEFORE the application starts.
The workflow is this way:
Copy-datadir copy the datadir in a separate Docker volume.
The script envsubst starts and replace everything needed in the separate Docker volume
The application starts using the datadir from the separate Docker volume.
Unfortunately, this is not very practical and user-friendly. We actually tried to implement a functionality that exist in Kubernetes but not in Docker compose, but this didn't work like we really wanted.
We actually want to get rid of this specific "copy-datadir" container: #291.
Answer to the technical problems
Do I need to modify the configs submodule files ?
The config directory is the datadir so if you want to modify some files then you need to do it in the directory.
If not, is modifying .env-xxx files enough ? (as detail in README).
You should prefer modifying the .envs files over modifying the datadir if the parameter exists through an env. Like the DB setting.
If i need to changes a datadir value, what is the process ? Need I to recreate container ?
Yes you need to relaunch the container so that it copy the data to the separate Docker volume.
I think if you do docker compose down then docker compose up -d then everything should be synced with the new changes done in the datadir.
For a development stack,
I'd like to understand how datadir works with docker.
Docker compose create a Container :
docker-copy-datadir-1
Some questions about :
configs
submodule files ?.env-xxx
files enough ? (as detail in README).Thanks :)
The text was updated successfully, but these errors were encountered: