Start pulling envvars from .env

This is unnecessery but if you have to declare the same thing in more
then one place it makes sense to pull these from a file.

In certain environments it would make more sense to declare them explicitly
under a environment: directive
This commit is contained in:
Leopere 2018-10-15 03:07:06 -04:00
parent 6823ed3e2d
commit 5280d2fa11
No known key found for this signature in database
GPG key ID: 64476C903E477CCB

View file

@ -18,6 +18,8 @@ services:
ipv4_address: 10.5.1.11 ipv4_address: 10.5.1.11
aliases: aliases:
- mysql - mysql
env_file:
- .env
environment: environment:
## These variables are stored in the .env file next to this docker-compose.yml file. ## These variables are stored in the .env file next to this docker-compose.yml file.
## I will include a default .env file and .gitignore the ".env" pattern so you should be able to just git pull in the future if you need to. ## I will include a default .env file and .gitignore the ".env" pattern so you should be able to just git pull in the future if you need to.
@ -40,6 +42,8 @@ services:
networks: networks:
traefik: traefik:
ipv4_address: 10.5.1.20 ipv4_address: 10.5.1.20
env_file:
- .env
environment: environment:
AWS_ID: ${AWS_ID:-default} AWS_ID: ${AWS_ID:-default}
AWS_SECRET: ${AWS_SECRET:-default} AWS_SECRET: ${AWS_SECRET:-default}