services: webapp: build: context: ./src dockerfile: Dockerfile args: BACKEND_URL: ${BACKEND_URL:-http://localhost:8000} # this argument is important on build to set the server url! container_name: ${INFRASTRUCTURE_LABEL:-default}-frontend-${ENVIRONMENT:-development} profiles: ["webapp", "frontend", "all", "app"] ports: - 3000:3000 labels: - "traefik.enable=${TRAEFIK_ENABLE:-false}" - "traefik.http.routers.webapp.service=webapp" - "traefik.http.routers.webapp.entrypoints=${TRAEFIK_ENTRYPOINT}" - 'traefik.http.routers.webapp.rule=Host(`${FRONTEND_DOMAIN}`) || Host(`${FRONTEND_DOMAIN_2}`)' - "traefik.http.services.webapp.loadbalancer.server.port=3000" - "traefik.docker.network=${TRAEFIK_NETWORK}"