Traefik Deployed to Production
This commit is contained in:
38
traefik/stack.yml
Normal file
38
traefik/stack.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
services:
|
||||
traefik:
|
||||
image: traefik:v3.6.1
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
- 8082:8080
|
||||
environment:
|
||||
- CF_DNS_API_TOKEN_FILE=/run/secrets/cloudflare_api_token
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./static.yml:/etc/traefik/traefik.yml:ro
|
||||
- ./dynamic.yml:/etc/traefik/dynamic/dynamic.yml:ro
|
||||
- /home/doc/projects/swarm-data/traefik/certificates:/certificates
|
||||
secrets:
|
||||
- cloudflare_api_token
|
||||
networks:
|
||||
- frostlabs
|
||||
healthcheck:
|
||||
test: [ "CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:8080/ping" ]
|
||||
interval: 30s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
deploy:
|
||||
mode: replicated
|
||||
replicas: 1
|
||||
placement:
|
||||
constraints:
|
||||
- node.labels.task == control
|
||||
|
||||
networks:
|
||||
frostlabs:
|
||||
external: true
|
||||
|
||||
secrets:
|
||||
cloudflare_api_token:
|
||||
external: true
|
||||
Reference in New Issue
Block a user