Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for docker secrets in ENV #67

Open
Sector14 opened this issue Nov 14, 2022 · 2 comments
Open

Support for docker secrets in ENV #67

Sector14 opened this issue Nov 14, 2022 · 2 comments

Comments

@Sector14
Copy link

Would it be possible to add additional ENV options to read from a file in order to support docker secrets?

Describe the solution you'd like
Rather than setting S3_ACCESS_KEY_ID=mysecretkey

I'd like to instead set a _FILE version e.g S3_ACCESS_KEY_ID_FILE=/run/secrets/mydockersecret

Reading that file will then provide you with "mysecretkey". Having _FILE support for the S3_ACCESS_KEY_ID and S3_SECRET_KEY would be useful, as well as any future ENV items that may be expected to hold secrets.

Describe alternatives you've considered
Mounting an entire env file as a docker secret is probably a viable workaround but it's a bit hacky.

The _FILE option of env vars is how other projects have provided support for docker secrets and seems to be the "norm". For example MySQL. See "MYSQL_PASSWORD_FILE" at the following link https://docs.docker.com/engine/swarm/secrets/#advanced-example-use-secrets-with-a-wordpress-service

@dekobon
Copy link
Collaborator

dekobon commented Nov 17, 2022

Are you using AWS S3 or another S3 compatible object store?

@Sector14
Copy link
Author

Using minio (and backblaze) both S3 compatible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants