services:
  # Next.js 프론트엔드
  plm-frontend:
    build:
      context: ../../frontend
      dockerfile: ../docker/prod/frontend.Dockerfile
      args:
        - NEXT_PUBLIC_API_URL=https://api.vexplor.com
    container_name: plm-frontend
    restart: always
    environment:
      NODE_ENV: production
      NEXT_PUBLIC_API_URL: https://api.vexplor.com
      NEXT_TELEMETRY_DISABLED: "1"
      PORT: "3000"
      HOSTNAME: 0.0.0.0
    volumes:
      - /home/vexplor/frontend_data:/app/data
    labels:
      - traefik.enable=true
      - traefik.http.routers.frontend.rule=Host(`v1.vexplor.com`)
      - traefik.http.routers.frontend.entrypoints=websecure,web
      - traefik.http.routers.frontend.tls=true
      - traefik.http.routers.frontend.tls.certresolver=le
      - traefik.http.services.frontend.loadbalancer.server.port=3000

networks:
  default:
    name: toktork_server_default
    external: true
