services: app: build: context: . dockerfile: Dockerfile container_name: allAndOne env_file: - .env ports: - "3000:3000" volumes: - .:/app - /app/node_modules - /app/.next labels: - traefik.enable=true - traefik.docker.network=traefik-public - traefik.constraint-label=traefik-public # - traefik.http-allAndOne.loadbalancer.server.port=80 # - traefik.http.routers.allAndOne-http.rule=Host(`${DOMAIN?Variable not set}`) || Host(`www.${DOMAIN?Variable not set}`) # - traefik.http.routers.allAndOne-http.entrypoints=http # - traefik.http.routers.allAndOne-https.rule=Host(`${DOMAIN?Variable not set}`) || Host(`www.${DOMAIN?Variable not set}`) # - traefik.http.routers.allAndOne-https.entrypoints=https # - traefik.http.routers.allAndOne-https.tls=true # - traefik.http.routers.allAndOne-https.tls.certresolver=le - traefik.basic.frontend.rule=Host(`${DOMAIN?Variable not set}`) || Host(`www.${DOMAIN?Variable not set}`) - "traefik.basic.port=3000" - "traefik.basic.protocol=http" # Enable www redirection for HTTP and HTTPS # - traefik.http.routers.allAndOne-https.middlewares=www-redirect # - traefik.http.routers.allAndOne-http.middlewares=https-redirect,www-redirect networks: - traefik-public - default networks: traefik-public: # Allow setting it to false for testing external: true