-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
169 lines (160 loc) · 4.56 KB
/
docker-compose.yml
File metadata and controls
169 lines (160 loc) · 4.56 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
services:
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
ports:
- "${NGINX_HTTP_PORT:-80}:80"
- "${NGINX_HTTPS_PORT:-443}:443"
volumes:
- ./nginx/ssl:/etc/nginx/ssl:ro
- ./nginx/logs:/var/log/nginx
depends_on:
- frontend
- backend
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- chatdku-network
redis:
image: redis/redis-stack-server:latest
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
command:
- sh
- -c
- >
if [ -n "$REDIS_PASSWORD" ]; then
exec redis-stack-server --requirepass "$REDIS_PASSWORD";
else
exec redis-stack-server;
fi
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- chatdku-network
chromadb:
image: chromadb/chroma:latest
command:
- run
- --host
- 0.0.0.0
- --port
- "8010"
- --path
- /data
volumes:
- chroma-data:/data
networks:
- chatdku-network
backend:
build:
context: .
dockerfile: Dockerfile.backend
working_dir: /app/chatdku/chatdku/django/chatdku_django
command: ["python", "manage.py", "runserver", "0.0.0.0:8007"]
environment:
DJANGO_DEBUG: ${DJANGO_DEBUG:-false}
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY:-change-me}
DJANGO_ALLOWED_HOSTS: ${DJANGO_ALLOWED_HOSTS:-localhost,127.0.0.1}
DJANGO_CORS_ORIGINS: ${DJANGO_CORS_ORIGINS:-http://localhost:8003}
DJANGO_CSRF_TRUSTED_ORIGINS: ${DJANGO_CSRF_TRUSTED_ORIGINS:-http://localhost:8003}
NAME_DB: ${NAME_DB:-chatdku_db}
USERNAME_DB: ${USERNAME_DB:-chatdku_user}
PASSWORD_DB: ${PASSWORD_DB:-change-me}
HOST_DB: ${HOST_DB:-postgres}
PORT_DB: ${PORT_DB:-5432}
REDIS_HOST: ${REDIS_HOST:-redis}
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
CHROMA_HOST: ${CHROMA_HOST:-chromadb}
CHROMA_DB_PORT: ${CHROMA_DB_PORT:-8010}
HF_ENDPOINT: ${HF_ENDPOINT:-https://hf-mirror.com}
LLM_API_KEY: ${LLM_API_KEY:-}
LLM_BASE_URL: ${LLM_BASE_URL:-http://host.docker.internal:18085/v1}
LLM_MODEL: ${LLM_MODEL:-Qwen/Qwen3.5-4B}
OPENAI_API_KEY: ${LLM_API_KEY:-}
TEI_URL: ${TEI_URL:-http://host.docker.internal:8080}
WHISPER_MODEL_URI: ${WHISPER_MODEL_URI:-}
STT_ENABLED: ${STT_ENABLED:-false}
PHOENIX_HOST: ${PHOENIX_HOST:-phoenix}
PHOENIX_PORT: ${PHOENIX_PORT:-6006}
depends_on:
- postgres
- redis
- chromadb
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- ./data:/app/chatdku/chatdku/django/chatdku_django/data
- ./logs:/app/chatdku/logs
ports:
- "8007:8007"
networks:
- chatdku-network
frontend:
build:
context: .
dockerfile: Dockerfile.frontend
environment:
NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL:-http://localhost:8007}
NEXT_PUBLIC_DICTATION_WS_URL: ${NEXT_PUBLIC_DICTATION_WS_URL:-ws://localhost:8007}
BACKEND_INTERNAL_URL: ${BACKEND_INTERNAL_URL:-http://backend:8007}
BACKEND_FEEDBACK_URL: ${BACKEND_FEEDBACK_URL:-http://backend:8007/feedback}
depends_on:
- backend
ports:
- "8003:8003"
networks:
- chatdku-network
postgres:
image: postgres:16
environment:
POSTGRES_DB: ${NAME_DB:-chatdku_db}
POSTGRES_USER: ${USERNAME_DB:-chatdku_user}
POSTGRES_PASSWORD: ${PASSWORD_DB:-change-me}
volumes:
- postgres-data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- chatdku-network
celery:
build:
context: .
dockerfile: Dockerfile.backend
profiles: ["django"]
working_dir: /app/chatdku/chatdku/django/chatdku_django
command: ["celery", "-A", "chatdku_django", "worker", "--beat", "-l", "INFO"]
environment:
REDIS_HOST: ${REDIS_HOST:-redis}
REDIS_PASSWORD: ${REDIS_PASSWORD:-}
DJANGO_SECRET_KEY: ${DJANGO_SECRET_KEY:-change-me}
NAME_DB: ${NAME_DB:-chatdku_db}
USERNAME_DB: ${USERNAME_DB:-chatdku_user}
PASSWORD_DB: ${PASSWORD_DB:-change-me}
HOST_DB: ${HOST_DB:-postgres}
PORT_DB: ${PORT_DB:-5432}
depends_on:
- backend
- redis
- postgres
volumes:
- ./data:/app/chatdku/chatdku/django/chatdku_django/data
networks:
- chatdku-network
phoenix:
image: arizephoenix/phoenix:latest
profiles: ["phoenix"]
ports:
- "6006:6006"
networks:
- chatdku-network
volumes:
redis-data:
chroma-data:
postgres-data:
networks:
chatdku-network:
driver: bridge