Skip to content

Instantly share code, notes, and snippets.

@neilbartley
Last active October 26, 2018 11:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neilbartley/9aac6bfcbfd78e10f52c3d86f4a8403b to your computer and use it in GitHub Desktop.
Save neilbartley/9aac6bfcbfd78e10f52c3d86f4a8403b to your computer and use it in GitHub Desktop.
Calming App Jams with Træfik
version: '3.4'
services:
proto1:
image: 123456789012.dkr.ecr.eu-west-1.amazonaws.com/prototoype:deploy-20181019-1050-a127c89
command: bundle exec puma -p 9292
# This links to the network created in the proxy (traefik) stack
networks:
- traefik_traefik
# This is where the 'magic' is defined. In a non-swarm environment this would be defined as plain labels.
deploy:
labels:
- "traefik.enable=true" # Use traefik for this service
- "traefik.backend=proto1" # What service to talk to
- "traefik.frontend.rule=Host:proto1.our-proto-domain.co.uk" # What domain should this service use?
- "traefik.docker.network=traefik_traefik" # The network to use
- "traefik.port=9292" # The port to use for the service
secrets:
- source: proto1_secrets_1.0.yml
target: /app/secrets.yml
secrets:
proto1_secrets_1.0.yml:
external: true
networks:
traefik_traefik:
external: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment