services:
  mining-admin-web:
    build:
      context: .
      dockerfile: Dockerfile
    image: rwa-mining-admin-web:latest
    container_name: rwa-mining-admin-web
    restart: unless-stopped
    ports:
      - "${PORT:-3100}:3100"
    environment:
      - TZ=Asia/Shanghai
      - NODE_ENV=production
      - PORT=3100
      - NEXT_TELEMETRY_DISABLED=1
      - NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL:-http://localhost:3023}
      - NEXT_PUBLIC_APP_NAME=挖矿管理后台
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:3100/"]
      interval: 30s
      timeout: 3s
      retries: 3
      start_period: 40s
    networks:
      - rwa-network

networks:
  rwa-network:
    external: true
    name: rwa-network
