-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
75 lines (64 loc) · 3.08 KB
/
Copy pathdocker-compose.yml
File metadata and controls
75 lines (64 loc) · 3.08 KB
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
74
75
services:
postgres:
build:
context: .
dockerfile: Dockerfile
image: postgres-with-bigm:16-alpine
container_name: postgres-container
restart: unless-stopped
user: root
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_INITDB_ARGS: "--encoding=UTF-8 --locale=C"
ports:
- "5432:5432"
volumes:
# 1. 스키마 생성용 SQL (숫자 접두사로 순서 제어)
- ./postgresql/10_init_postgres.sql:/docker-entrypoint-initdb.d/10_init_postgres.sql
# 2. JSON 적재 쉘 스크립트 (1번보다 나중에 실행되도록)
- ./postgresql/11_load_data_from_json.sh:/docker-entrypoint-initdb.d/11_load_data_from_json.sh
# 3. 위 쉘 스크립트가 참조할 파일들
- ./postgresql/11_load_data_from_json.sql:/init-data/qna/11_load_data_from_json.sql
- ./postgresql/data/qna/faq/card_faq.json:/init-data/qna/faq/card_faq.json
- ./postgresql/data/qna/term/financial_terms.json:/init-data/qna/term/financial_terms.json
# 4. 백엔드용 별도 DB 생성 스크립트
- ./postgresql/20_init_backend_db.sql:/docker-entrypoint-initdb.d/20_init_backend_db.sql
# 5. 클러스터링 DB 스키마 생성
- ./postgresql/30_init_clustering_db.sql:/docker-entrypoint-initdb.d/30_init_clustering_db.sql
# 6. 클러스터링 데이터 로드 스크립트
- ./postgresql/31_load_clustering_data.sh:/docker-entrypoint-initdb.d/31_load_clustering_data.sh
# 7. 클러스터링 CSV 데이터 파일들
- ./postgresql/clustering/persona_consumption_data.csv:/init-data/clustering/persona_consumption_data.csv
- ./postgresql/clustering/clustering_result.csv:/init-data/clustering/clustering_result.csv
- ./postgresql/clustering/user_card_usage.csv:/init-data/clustering/user_card_usage.csv
- ./postgresql/clustering/cluster_recommended_cards.csv:/init-data/clustering/cluster_recommended_cards.csv
# 8. 데이터 영속성 볼륨
- ./mount/postgres_data:/var/lib/postgresql/data
qdrant:
image: qdrant/qdrant:v1.15
container_name: qdrant-container
restart: unless-stopped
ports:
- "6333:6333" # gPRC API 포트
- "6334:6334" # REST API 포트 (웹 UI 접속용)
volumes:
# 사전에 임베딩된 벡터 데이터 마운트
- ./qdrant/data/Qdrant_DB:/qdrant/storage
# 2. Redis
redis:
image: redis:7-alpine
container_name: msa-redis
restart: always
ports:
- "6379:6379"
volumes:
# [데이터 영속성] 호스트의 ./redis/data 폴더와 컨테이너의 데이터 폴더 연결
- ./mount/redis_data:/data
# [설정] 기존 redis.conf 마운트
- ./redis/redis.conf:/usr/local/etc/redis/redis.conf
command: ["redis-server", "/usr/local/etc/redis/redis.conf"] # conf 파일 사용
# ...
# (선택) 명명된 볼륨을 사용하지 않고 위처럼 폴더 경로를 직접 지정(bind mount)하면
# volumes: 최상위 레벨의 volumes 선언은 필요 없습니다.