-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yaml
110 lines (100 loc) · 2.16 KB
/
docker-compose.yaml
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
version: "3.8"
services:
init_db:
image: ghcr.io/nattvara/kthgpt/api:latest
env_file:
- .env
depends_on:
- db
volumes:
- shared:/shared
command: create_db_schema
api:
image: ghcr.io/nattvara/kthgpt/api:latest
restart: always
env_file:
- .env
ports:
- "8000:8000"
depends_on:
- db
- queue
volumes:
- shared:/shared
command: uvicorn api:main --host 0.0.0.0 --port 8000
db:
image: postgres:12
restart: always
env_file:
- .env
ports:
- "5432:5432"
volumes:
- db:/var/lib/postgresql/data
queue:
image: redis:7.0.8-alpine
restart: always
ports:
- "6379:6379"
command: redis-server --save 20 1 --loglevel warning --requirepass ${REDIS_PASSWORD}
volumes:
- queue:/data
search:
image: opensearchproject/opensearch:latest
restart: always
ports:
- "9200:9200"
environment:
- discovery.type=single-node
queue_worker_gpt:
image: ghcr.io/nattvara/kthgpt/worker:latest
restart: always
env_file:
- .env
depends_on:
- db
- queue
- api
command: rq worker --with-scheduler --url="redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}" gpt
deploy:
replicas: 2
volumes:
- shared:/shared
queue_worker:
image: ghcr.io/nattvara/kthgpt/worker:latest
restart: always
env_file:
- .env
depends_on:
- db
- queue
- api
command: rq worker --with-scheduler --url="redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT}" default download extract transcribe summarise monitoring approval metadata image image_questions image image_metadata classifications
deploy:
replicas: 2
volumes:
- shared:/shared
frontend:
image: ghcr.io/nattvara/kthgpt/web-ui:latest
restart: always
env_file:
- .env
ports:
- "8080:80"
proxy:
image: kthgpt_proxy
build:
context: proxy
dockerfile: ./Dockerfile
restart: always
env_file:
- .env
ports:
- "1337:80"
volumes:
db:
driver: local
queue:
driver: local
shared:
driver: local