version: "3.9"

services:
  frontend:
    image: ${IMAGE_NAME:-refinedev/tjwater-frontend:latest}
    build:
      context: .
      dockerfile: Dockerfile
    environment:
      BACKEND_URL: ${BACKEND_URL}
      AGENT_URL: ${AGENT_URL}
      MAP_URL: ${MAP_URL}
      MAP_WORKSPACE: ${MAP_WORKSPACE}
      MAP_EXTENT: ${MAP_EXTENT}
      NETWORK_NAME: ${NETWORK_NAME}
      MAPBOX_TOKEN: ${MAPBOX_TOKEN}
      TIANDITU_TOKEN: ${TIANDITU_TOKEN}
      KEYCLOAK_CLIENT_ID: ${KEYCLOAK_CLIENT_ID}
      KEYCLOAK_CLIENT_SECRET: ${KEYCLOAK_CLIENT_SECRET}
      KEYCLOAK_ISSUER: ${KEYCLOAK_ISSUER}
      NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
      NEXTAUTH_URL: ${NEXTAUTH_URL}
      NODE_ENV: production
      HOSTNAME: 0.0.0.0
      PORT: 3000
    ports:
      - "3000:3000"
    restart: unless-stopped
    pull_policy: always
