From 4ad3596daac373a37b83ea94c1a43587f9e5afe7 Mon Sep 17 00:00:00 2001 From: cytopia Date: Tue, 26 Sep 2017 19:53:31 +0200 Subject: [PATCH] REL-0.12 #128 Source environment variables --- docker-compose.yml | 11 +++++++++++ env-example | 24 ++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index ffc942a5..61b23fbe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -73,6 +73,17 @@ services: #context: https://github.com/cytopia/docker-${PHP_SERVER}.git#1 # context: https://github.com/cytopia/docker-${PHP_SERVER}.git + + ## + ## Custom variables + ## + ## Source all variables defined in .env + ## This makes any custom variable available in each PHP/HHVM container + ## + env_file: + - ./.env + + environment: ## diff --git a/env-example b/env-example index 28a6da7f..bedd085d 100644 --- a/env-example +++ b/env-example @@ -8,6 +8,8 @@ ### ### No need to rebuild any dockers! ### +### For custom variables, scroll to the bottom +### ### @@ -483,3 +485,25 @@ HOST_PORT_BIND=1053 ### You can also add DNS servers from your LAN (if any are available) ### BIND_DNS_RESOLVER=8.8.8.8,8.8.4.4 + + + +################################################################################ +### +### 11. Custom variables +### +################################################################################ + +### +### Any variable defined in this file will be available +### as environment variables to your PHP/HHV Docker container. +### +### This might be useful to set application environment and retriev +### them via: +### + +### +### Example: +### would produce: 'some value' +### +#Foo=some value