fix: remove health checks on compose examples (#1871)

Traefik does not add routes for containers via the Docker provider if the health check does not return healthy, this causes inadvertent user experience issues when attempting the pre-made compose examples.

This change removes the health checks for said examples and also ensures that Traefik logs are written to stdout so a user can view them within the Docker container logs.

Co-authored-by: James Elliott <james-d-elliott@users.noreply.github.com>
pull/1872/head^2
Amir Zarrinkafsh 2021-03-30 16:17:11 +11:00 committed by GitHub
parent dbb819dfa5
commit 661d82587e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 7 deletions

View File

@ -24,6 +24,8 @@ services:
expose: expose:
- 9091 - 9091
restart: unless-stopped restart: unless-stopped
healthcheck:
disable: true
environment: environment:
- TZ=Australia/Melbourne - TZ=Australia/Melbourne
@ -74,10 +76,9 @@ services:
- '--certificatesResolvers.letsencrypt.acme.httpChallenge.entryPoint=http' - '--certificatesResolvers.letsencrypt.acme.httpChallenge.entryPoint=http'
- '--log=true' - '--log=true'
- '--log.level=DEBUG' - '--log.level=DEBUG'
- '--log.filepath=/var/log/traefik.log'
secure: secure:
image: containous/whoami image: traefik/whoami
container_name: secure container_name: secure
networks: networks:
- net - net
@ -93,7 +94,7 @@ services:
restart: unless-stopped restart: unless-stopped
public: public:
image: containous/whoami image: traefik/whoami
container_name: public container_name: public
networks: networks:
- net - net

View File

@ -24,6 +24,8 @@ services:
expose: expose:
- 9091 - 9091
restart: unless-stopped restart: unless-stopped
healthcheck:
disable: true
environment: environment:
- TZ=Australia/Melbourne - TZ=Australia/Melbourne
@ -59,10 +61,9 @@ services:
- '--entrypoints.https.address=:443' - '--entrypoints.https.address=:443'
- '--log=true' - '--log=true'
- '--log.level=DEBUG' - '--log.level=DEBUG'
- '--log.filepath=/var/log/traefik.log'
secure: secure:
image: containous/whoami image: traefik/whoami
container_name: secure container_name: secure
networks: networks:
- net - net
@ -78,7 +79,7 @@ services:
restart: unless-stopped restart: unless-stopped
public: public:
image: containous/whoami image: traefik/whoami
container_name: public container_name: public
networks: networks:
- net - net

View File

@ -22,7 +22,7 @@ provision](https://docs.traefik.io/https/acme/) up-to-date certificates for your
Traefik publishes the respective services with LetsEncrypt provided certificates on port `443`. Traefik publishes the respective services with LetsEncrypt provided certificates on port `443`.
The provided examples protect the Traefik dashboard with Authelia's one-factor auth The provided examples protect the Traefik dashboard with Authelia's one-factor auth
(traefik.example.com) and two instances of the (traefik.example.com) and two instances of the
[whoami container](https://hub.docker.com/r/containous/whoami) with Authelia being [whoami container](https://hub.docker.com/r/traefik/whoami) with Authelia being
bypassed (public.example.com) and another with it's two-factor auth (secure.example.com). bypassed (public.example.com) and another with it's two-factor auth (secure.example.com).
If you happen to already have an external SQL instance (MariaDB, MySQL or Postgres) this If you happen to already have an external SQL instance (MariaDB, MySQL or Postgres) this