# 시놀로지 NAS 환경용 오버라이드
version: '3.8'

services:
  postgres:
    container_name: tk-mp-postgres-synology
    ports:
      - "15432:5432"
    volumes:
      - tk_mp_postgres_data:/var/lib/postgresql/data
      - ./database/init:/docker-entrypoint-initdb.d

  redis:
    container_name: tk-mp-redis-synology
    ports:
      - "16379:6379"
    volumes:
      - tk_mp_redis_data:/data

  backend:
    container_name: tk-mp-backend-synology
    ports:
      - "10080:8000"
    environment:
      - ENVIRONMENT=synology
      - DEBUG=false
      - RELOAD=false
      - LOG_LEVEL=INFO
      - DATABASE_URL=postgresql://${POSTGRES_USER:-tkmp_user}:${POSTGRES_PASSWORD:-tkmp_password_2025}@postgres:5432/${POSTGRES_DB:-tk_mp_bom}
      - REDIS_URL=redis://redis:6379
    volumes:
      - tk_mp_uploads:/app/uploads

  frontend:
    container_name: tk-mp-frontend-synology
    ports:
      - "10173:3000"
    environment:
      - VITE_API_URL=http://localhost:10080
    build:
      args:
        - VITE_API_URL=http://localhost:10080

  # 시놀로지에서는 pgAdmin 포트 변경
  pgadmin:
    container_name: tk-mp-pgadmin-synology
    ports:
      - "15050:80"

# 시놀로지용 명명된 볼륨
volumes:
  tk_mp_postgres_data:
    external: false
  tk_mp_redis_data:
    external: false
  tk_mp_uploads:
    external: false