psu/tests/dockerfiles/docker-stack-traefik.yml
Tortue Torche aca3e69669 Merge GitLab integration
# Conflicts:
#	CHANGELOG.md
#	Dockerfile
#	README.md
#	psu
2020-01-17 12:56:02 +00:00

46 lines
1.1 KiB
YAML

version: '3.6'
services:
reverse-proxy:
image: traefik:$TRAEFIK_VERSION
# Enables the web UI and tells Traefik to listen to docker
command:
- --api
- --docker
- --docker.watch
- --defaultEntryPoints=http,https
# IMPORTANT: The `retry.attempts` param is required to allow zero (1s) downtime deployment
- --retry.attempts=10
- "--entryPoints=Name:http Address::80"
- "--entryPoints=Name:https Address::443 TLS WhiteList.UseXForwardedFor:true"
- --docker.exposedbydefault=false
environment:
- HTTP_PROXY
- HTTPS_PROXY
- http_proxy
- https_proxy
- NO_PROXY
ports:
- "80:80"
- 443:443
# The Web UI (enabled by --api)
- "8080:8080"
networks:
- traefik-net
volumes:
# So that Traefik can listen to the Docker events
- /var/run/docker.sock:/var/run/docker.sock
deploy:
mode: global
placement:
constraints:
- node.role == manager
update_config:
parallelism: 1
delay: 10s
networks:
traefik-net:
driver: overlay
name: traefik-net