services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: ydm-c360-app
    ports:
      - "3030:3030"
    env_file:
      - .env
    environment:
      - BUN_ENV=${BUN_ENV:-development}
      - APP_ENV=${APP_ENV:-development}
      - PORT=${PORT:-3030}
      - CHOKIDAR_USEPOLLING=${CHOKIDAR_USEPOLLING:-true}
      - APP_PORT=${APP_PORT:-3030}
      - API_UNIFY_URL=${API_UNIFY_URL:-}
      - API_UNIFY_USERNAME=${API_UNIFY_USERNAME:-}
      - API_UNIFY_PASSWORD=${API_UNIFY_PASSWORD:-}
    volumes:
      # Mount source code สำหรับ hot reload
      - ./src:/app/src
      - ./core:/app/core
      - ./assets:/app/assets
      - ./public:/app/public
      - ./tsconfig.json:/app/tsconfig.json
    restart: unless-stopped

