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

Fix publicly available .env file #76

Closed
dsha256 opened this issue Jan 10, 2023 · 1 comment
Closed

Fix publicly available .env file #76

dsha256 opened this issue Jan 10, 2023 · 1 comment

Comments

@dsha256
Copy link

dsha256 commented Jan 10, 2023

How do you provide .env file content for the workflows without publicly including it in the repo?

@pawlobanano
Copy link

pawlobanano commented Jan 31, 2023

Hi @dsha256,
It works by getting the content of a secret from AWS Secrets Manager, here

run: aws secretsmanager get-secret-value --secret-id simple_bank --query SecretString --output text | jq -r 'to_entries|map("\(.key)=\(.value)")|.[]' > app.env

And this happens as a step just before the docker container build, just before pushing it to the AWS Elastic Container Registry.
No output of the file is shown in the console, therefore it is considered a safe way.

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

3 participants