Server Secrets or .ENV for private information in seperate Compose Files/Stacks #27

Open
opened 2023-12-16 14:40:49 -05:00 by sickprodigy · 1 comment
Owner

Trying to figure out the best way to handle this.

I want to start updating my configs through git so I can take note of changes made and what was working for and when it all went to shit etc.

Just makes more sense. So to do that, I need to hide private information at the same time that are setup in config files.

Docker says the best thing to do is use secrets:
https://docs.docker.com/compose/use-secrets/

Trying to figure out the best way to handle this. I want to start updating my configs through git so I can take note of changes made and what was working for and when it all went to shit etc. Just makes more sense. So to do that, I need to hide private information at the same time that are setup in config files. Docker says the best thing to do is use secrets: https://docs.docker.com/compose/use-secrets/
Author
Owner

Well i forgot how to do this and want to clarify here

https://gitea.rcs1.top/sickprodigy/docker-containers2/src/branch/main/karakeep/docker-compose.yml

normally looks like so:

    env_file:
      - .env

but replace with:


    env_file:
      - stack.env

for docker compose file within portainer. Then you manually load in the .env file in the gui

Well i forgot how to do this and want to clarify here https://gitea.rcs1.top/sickprodigy/docker-containers2/src/branch/main/karakeep/docker-compose.yml normally looks like so: ``` env_file: - .env ``` but replace with: ``` env_file: - stack.env ``` for docker compose file within portainer. Then you manually load in the .env file in the gui
sickprodigy added the
Kind/Security
Priority
High
labels 2025-06-29 21:08:21 -04:00
Sign in to join this conversation.
No description provided.