Last active
May 8, 2017 01:49
-
-
Save marciopuga/896ad1351625d39a39f06e51ac138fb6 to your computer and use it in GitHub Desktop.
Microservices running on Docker reverse proxy using Traefik, Docker Swarm and Docker Compose v3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
traefik: | |
image: marciopuga/traefik:latest | |
build: ./traefik/. | |
command: --web --docker --docker.domain=docker.localhost --docker.watch \ | |
--logLevel=DEBUG \ | |
--docker.exposedbydefault=false \ | |
--entryPoints='Name:http Address::80' \ | |
--defaultEntryPoints='http' | |
networks: | |
- default | |
- traefik-net | |
ports: | |
- "80:80" | |
- "8080:8080" | |
- "443:443" | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- traefikdata:/etc/traefik/acme | |
pugacombr: | |
build: ./marciopuga.github.io/. | |
image: marciopuga/pugacombr:latest | |
container_name: pugacombr | |
networks: | |
- default | |
- traefik-net | |
ports: | |
- 8002:80 | |
labels: | |
- "traefik.port=80" | |
- "traefik.enable=true" | |
- "traefik.backend=machine-puga" | |
- "traefik.docker.network=district9_traefik-net" | |
- "traefik.frontend.rule=Host:puga.localhost" | |
networks: | |
traefik-net: | |
volumes: | |
traefikdata: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
traefik: | |
image: traefik | |
command: --web --docker --docker.domain=docker.localhost --docker.watch \ | |
--logLevel=DEBUG \ | |
--defaultEntryPoints='http,https' \ | |
--entryPoints='Name:http Address::80' \ | |
--entryPoints='Name:https Address::443 TLS' \ | |
--docker.swarmmode=true \ | |
--docker.exposedbydefault=false \ | |
--acme \ | |
--acme.entryPoint='https' \ | |
--acme.email='[email protected]' \ | |
--acme.ondemand=false \ | |
--acme.acmelogging=true \ | |
--acme.onhostrule=true \ | |
--acme.storage='/etc/traefik/acme/acme.json' | |
networks: | |
- default | |
- traefik-net | |
ports: | |
- "80:80" | |
- "8080:8080" | |
- "443:443" | |
volumes: | |
- /var/run/docker.sock:/var/run/docker.sock | |
- traefikdata:/etc/traefik/acme | |
lexicalgap: | |
image: nginx | |
networks: | |
- default | |
- traefik-net | |
ports: | |
- "8001:80" | |
volumes: | |
- /home/marcio/lexicalgapcomau:/usr/share/nginx/html | |
deploy: | |
labels: | |
- "traefik.port=80" | |
- "traefik.enable=true" | |
- "traefik.backend=machine-lexicalgap" | |
- "traefik.docker.network=district9_traefik-net" | |
- "traefik.frontend.rule=Host:lexicalgap.com.au,www.lexicalgap.com.au" | |
pugacombr: | |
image: marciopuga/pugacombr:latest | |
networks: | |
- default | |
- traefik-net | |
volumes: | |
- /home/marcio/pugacombr:/home | |
ports: | |
- "8002:80" | |
deploy: | |
labels: | |
- "traefik.port=80" | |
- "traefik.enable=true" | |
- "traefik.backend=machine-puga" | |
- "traefik.docker.network=district9_traefik-net" | |
- "traefik.frontend.rule=Host:puga.com.br,www.puga.com.br" | |
networks: | |
traefik-net: | |
volumes: | |
traefikdata: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment