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:
parent
6a86e29557
commit
3f08eef758
1 changed files with 4 additions and 0 deletions
|
@ -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}
|
||||||
|
|
Loading…
Reference in a new issue