version: "3" services: pda: image: ngoduykhanh/powerdns-admin:${PDA_VERSION} restart: always environment: - SQLALCHEMY_DATABASE_URI=${PDA_DBURI} - GUNICORN_TIMEOUT=60 - GUNICORN_WORKERS=2 - GUNICORN_LOGLEVEL=INFO - OFFLINE_MODE=False labels: - traefik.enable=${TRAEFIK_ENABLED} - traefik.docker.network=traefik ### Section HTTP - traefik.http.routers.http-${TRAEFIK_ROUTER}.entrypoints=http # redirect to HTTPS only - traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=http-to-https - traefik.http.routers.http-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_MATCHRULE}`) ### Section HTTPS - traefik.http.routers.https-${TRAEFIK_ROUTER}.entrypoints=https # configure the exposed service - traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=Host(`${TRAEFIK_MATCHRULE}`) # of course, enable TLS and it's certificate provider - traefik.http.routers.https-${TRAEFIK_ROUTER}.tls=${TRAEFIK_TLSENABLED} - traefik.http.routers.https-${TRAEFIK_ROUTER}.tls.certresolver=${TRAEFIK_CERTRESOLVER} # specify a service so a custom port can be used - traefik.http.services.${TRAEFIK_SERVICE}.loadbalancer.server.port=${TRAEFIK_SERVICE_PORT} networks: - traefik networks: traefik: external: true name: ${TRAEFIK_NETWORK}