--- services: nginx: image: nginx:${NGINX_VERSION} restart: unless-stopped labels: ### Section Træfik - traefik.enable=${TRAEFIK_ENABLED} - traefik.docker.network=${TRAEFIK_NETWORK} ## HTTP - traefik.http.routers.http-${TRAEFIK_ROUTER}.entrypoints=http # redirect to HTTPS only - traefik.http.routers.http-${TRAEFIK_ROUTER}.middlewares=${TRAEFIK_HTTP_MIDDLEWARES} - traefik.http.routers.http-${TRAEFIK_ROUTER}.rule=${TRAEFIK_MATCHRULE} ## HTTPS - traefik.http.routers.https-${TRAEFIK_ROUTER}.entrypoints=https # configure the exposed service - traefik.http.routers.https-${TRAEFIK_ROUTER}.middlewares=${TRAEFIK_HTTPS_MIDDLEWARES} - traefik.http.routers.https-${TRAEFIK_ROUTER}.rule=${TRAEFIK_MATCHRULE} # enable TLS and its 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} ### Section Diun - diun.enable=${DIUN_NGINX_ENABLE} - diun.watch_repo=${DIUN_NGINX_WATCHREPO} - diun.sort_tags=${DIUN_NGINX_SORTALGO} - diun.include_tags=${DIUN_NGINX_INCLUDE} - diun.exclude_tags=${DIUN_NGINX_EXCLUDE} volumes: - ${NGINX_CONFIG}:/etc/nginx/nginx.conf - ${NGINX_SITECONFIG}:/etc/nginx/conf.d/default.conf - ${NGINX_DATA}:/var/www/html networks: - traefik networks: traefik: external: true name: ${TRAEFIK_NETWORK}