

3·
2 months agoI’ve got a Python script that could be adapted easily here:


I’ve got a Python script that could be adapted easily here:
You can specify a folder in your files for configs, and a different one for the compose and env:
- config
- <container_config>
- docker
- container
- compose.yml
Edit: then you can map your volume not to ./config:/config but instead to /config/containerName:/config


Definitely worth a shot.
One thing I do to prevent stuff from getting into a public git repo is:
.gitignore then add the line .env to it. Then git will ignore any file named .envsudo nano) by running sudo chmod 600 .env && sudo chown root:root .env

I have mine in git! I have:
-docker
- .env
- <thing name>
- dockers-compose.yml
Then using docker compose --env-file ../.env -v up -d it uses the above .env file. (../ means up one folder)
For more details and a bunch of my compose files checkout my repo! https://github.com/shadybraden/homelab/tree/main/docker
Yup! Here’s my setup:
https://github.com/shadybraden/compose/blob/main/kiwix/compose.yaml