Beanstalk Environments to Docker container build in .env file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Usefull extensions and Dockerfiles to setup Elastic Beanstalk app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"AWSEBDockerrunVersion": "1", | |
"Logging": "/tmp/app", | |
"Image": { | |
"Update": "true" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
files: | |
"/opt/elasticbeanstalk/hooks/appdeploy/pre/02_mix_environment.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env bash | |
EB_APP_DEPLOY_DIR=$(/opt/elasticbeanstalk/bin/get-config container -k app_deploy_dir) | |
# Example with MY_ENV | |
# MY_ENV=$(/opt/elasticbeanstalk/bin/get-config environment -k MY_ENV) | |
# echo "export DB_USER=${MY_ENV}" >> ${EB_APP_DEPLOY_DIR}/.env | |
# Add here yout environments |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example in Dockerfile | |
FROM ubuntu:latest | |
# Add commands here | |
# Set env | |
RUN /bin/bash -c "source .env" | |
# Set CMD or ENTRYPOINT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment