Setting the SMTP_PASSWORD with docker compose secrets #3291
-
Hey there. Since I like checking in all my configs I like them to be free of secrets in clear text. I wonder if it's possible to provide the value of the variable SMTP_PASSWORD with an docker compose secret. Here an example of what I would imagine: ---
services:
mealie:
image: ghcr.io/mealie-recipes/mealie:v1.3.2
container_name: mealie
ports:
- "9925:9000"
volumes:
- ./mealie_data:/etc/mealie/data
environment:
- TZ=Europe/Berlin
- BASE_URL=https://mealie.example.com
- SMTP_AUTH_STRATEGY=TLS
- [email protected]
- SMTP_HOST=smtp.example.com
- SMTP_PASSWORD_FILE=/run/secrets/smtp_password # <-- Look here
- SMTP_PORT=587
- [email protected]
secrets:
- source: smtp_password
secrets:
smtp_password:
name: my_smtp_password
file: /path/to/smtp_password Note the If it's possible in some other way I'd like to here how, thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
https://docs.pydantic.dev/latest/concepts/pydantic_settings/#use-case-docker-secrets I'm going to try adding this setting and go through an Issue and PR. |
Beta Was this translation helpful? Give feedback.
Done in #3606