services: nginx: image: nginx:latest # Use the latest official Nginx image container_name: ksan.dev_nginx networks: - frontend volumes: - ${LOCAL_PATH}:/usr/share/nginx/html labels: - traefik.enable=true - traefik.http.routers.nginx-http.rule=Host(`${DOMAIN}`) || Host(`www.${DOMAIN}`) - traefik.http.routers.nginx-http.entrypoints=web - traefik.http.routers.nginx-https.tls=true - traefik.http.routers.nginx-https.tls.certresolver=cloudflare - traefik.http.routers.nginx-https.entrypoints=websecure - traefik.http.routers.nginx-https.rule=Host(`${DOMAIN}`) || Host(`www.${DOMAIN}`) restart: always networks: frontend: external: true