File size: 1,906 Bytes
aa58f77
 
065853d
 
 
 
 
 
 
aa58f77
065853d
aa58f77
065853d
 
 
aa58f77
 
 
065853d
 
 
aa58f77
 
065853d
 
 
 
 
 
aa58f77
 
065853d
 
 
 
 
 
 
 
aa58f77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
065853d
 
aa58f77
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# docker-compose.yml - 로컬 개발 최적화

services:
  simsimi-ai-agent:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: simsimi_ai_agent
    ports:
      - "7860:7860"  # 허깅페이스와 동일한 포트
    volumes:
      # 🔄 소스코드 실시간 반영 (개발용)
      - ./src:/app/src
      - ./scripts:/app/scripts
      - ./main.py:/app/main.py
      - ./static:/app/static
      
      # 💾 데이터 영구 저장
      - ./data:/app/data
      - ./logs:/app/logs
      - ./cache:/app/cache
      
      # 🔑 환경변수 (로컬에서만)
      - ./.env:/app/.env:ro
    environment:
      - PYTHONPATH=/app
      - PYTHONDONTWRITEBYTECODE=1
      - PYTHONUNBUFFERED=1
      - HF_HOME=/app/cache
      - LOCAL_DEV=true           # 🏠 로컬 개발 환경 표시
      - DEVELOPMENT_MODE=true    # 🔧 개발 모드 활성화
    env_file:
      - .env
    restart: unless-stopped
    stdin_open: true
    tty: true
    networks:
      - simsimi_network

  # 🚀 프로덕션 테스트용 (옵션)
  simsimi-production-test:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: simsimi_production_test
    ports:
      - "7861:7860"  # 다른 포트로 동시 실행
    volumes:
      - ./data:/app/data
      - ./logs:/app/logs
      - ./cache:/app/cache
      - ./.env:/app/.env:ro
    environment:
      - PYTHONPATH=/app
      - PYTHONDONTWRITEBYTECODE=1
      - PYTHONUNBUFFERED=1
      - HF_HOME=/app/cache
      - PRODUCTION=true          # 🏭 프로덕션 모드 테스트
    env_file:
      - .env
    restart: unless-stopped
    profiles:
      - production-test  # docker-compose --profile production-test up
    networks:
      - simsimi_network

networks:
  simsimi_network:
    driver: bridge

# 사용법:
# 개발: docker-compose up
# 프로덕션 테스트: docker-compose --profile production-test up