services: qr-code-api: image: qr-code-api:latest build: context: . dockerfile: Dockerfile container_name: qr_code_api restart: unless-stopped environment: - NODE_ENV=production - PORT=3000 healthcheck: test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/health"] interval: 30s timeout: 10s retries: 3 start_period: 10s labels: - "traefik.enable=true" # HTTPS router - "traefik.http.routers.qr-code-api.rule=Host(`qr.crewsportswear.app`)" - "traefik.http.routers.qr-code-api.entrypoints=websecure" - "traefik.http.routers.qr-code-api.tls=true" - "traefik.http.routers.qr-code-api.tls.certresolver=le" # Service - "traefik.http.services.qr-code-api.loadbalancer.server.port=3000" # HTTP to HTTPS redirect - "traefik.http.routers.qr-code-api-http.rule=Host(`qr.crewsportswear.app`)" - "traefik.http.routers.qr-code-api-http.entrypoints=web" - "traefik.http.routers.qr-code-api-http.middlewares=https-redirect" - "traefik.http.middlewares.https-redirect.redirectscheme.scheme=https" - "traefik.http.middlewares.https-redirect.redirectscheme.permanent=true" networks: - traefik-public - crew-app-net - default networks: traefik-public: external: true crew-app-net: external: true