Skip to content

Instantly share code, notes, and snippets.

@MOZGIII
Created March 11, 2018 18:39
Show Gist options
  • Save MOZGIII/4af2bf2f98a8ca0c56dd605680c58e62 to your computer and use it in GitHub Desktop.
Save MOZGIII/4af2bf2f98a8ca0c56dd605680c58e62 to your computer and use it in GitHub Desktop.
docker-compose nested values sample
version: '3.5'
x-env: &env-common
COMMON_VALUE: "my-common-value"
x-service: &service-common
network_mode: host
environment:
<<: *env-common
services:
env:
<<: *service-common
image: "alpine"
command: "env"
env-with-custom:
<<: *service-common
image: "alpine"
command: "env"
environment:
<<: *env-common
CUSTOM_VALUE: my-custom-value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment