healthcheck ok
This commit is contained in:
parent
ccbbf616c1
commit
1f47a58a77
@ -6,13 +6,11 @@ services:
|
||||
image: traefik:v2.10
|
||||
container_name: traefik
|
||||
command:
|
||||
# For web ui traefik
|
||||
- "--api.insecure=true"
|
||||
- "--providers.docker=true"
|
||||
- "--providers.docker.swarmmode=false"
|
||||
- "--log.level=DEBUG"
|
||||
- "--providers.docker.exposedByDefault=false"
|
||||
|
||||
- "--entryPoints.web.address=:80"
|
||||
- "--entryPoints.websecure.address=:443"
|
||||
- "--certificatesResolvers.le.acme.email=${ACME_EMAIL}"
|
||||
@ -23,15 +21,20 @@ services:
|
||||
ports:
|
||||
- "443:443"
|
||||
- "80:80"
|
||||
# The Web UI (enabled by --api.insecure=true)
|
||||
- "8082:8080"
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ./acme:/acme
|
||||
networks:
|
||||
traefik_net:
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/api/rawdata"]
|
||||
interval: 30s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
timeout: 10s
|
||||
|
||||
# CONTAINER EXEMPLE
|
||||
whoami:
|
||||
image: traefik/whoami
|
||||
container_name: whoami
|
||||
@ -39,15 +42,20 @@ services:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)"
|
||||
- "traefik.http.routers.whoami.entrypoints=web"
|
||||
|
||||
# HTTPS
|
||||
# - traefik.http.routers.whoami-ssl.rule=Host(`whoami.localhost`)
|
||||
# - traefik.http.routers.whoami-ssl.entryPoints=websecure
|
||||
# - traefik.http.routers.whoami-ssl.tls=true
|
||||
# - traefik.http.routers.whoami-ssl.service=whoami
|
||||
# - traefik.http.routers.whoami-ssl.tls.certresolver=le
|
||||
- "traefik.http.routers.whoami-ssl.rule=Host(`whoami.localhost`)"
|
||||
- "traefik.http.routers.whoami-ssl.entryPoints=websecure"
|
||||
- "traefik.http.routers.whoami-ssl.tls=true"
|
||||
- "traefik.http.routers.whoami-ssl.tls.certresolver=le"
|
||||
networks:
|
||||
traefik_net:
|
||||
|
||||
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:80"]
|
||||
interval: 30s
|
||||
retries: 3
|
||||
start_period: 10s
|
||||
timeout: 10s
|
||||
|
||||
networks:
|
||||
traefik_net:
|
||||
traefik_net:
|
||||
external: false
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user