-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
187 lines (177 loc) · 6.27 KB
/
docker-compose.yml
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
# Define RabbitMQ environment variables once at the top level
x-environments: &rabbitmq_client_env
RABBITMQ_USER: ${RABBITMQ_USER}
RABBITMQ_PASS: ${RABBITMQ_PASS}
RABBITMQ_HOST: ${RABBITMQ_HOST}
RABBITMQ_PORT: ${RABBITMQ_PORT}
RABBITMQ_EXCHANGE_USER_CHATS: ${RABBITMQ_EXCHANGE_USER_CHATS}
RABBITMQ_QUEUE_USER_CHATS: ${RABBITMQ_QUEUE_USER_CHATS}
RABBITMQ_QUEUE_USER_CHAT_REPLIES: ${RABBITMQ_QUEUE_USER_CHAT_REPLIES}
services:
assistant:
image: python:3.12.3
working_dir: /app
environment:
<<: *rabbitmq_client_env
ASSISTANT_LANGUAGES: ${ASSISTANT_LANGUAGES}
OPENAI_API_KEY: ${OPENAI_API_KEY}
OPENAI_CHAT_MODEL: ${OPENAI_CHAT_MODEL}
CHROMADB_HOST: ${CHROMADB_HOST}
CHROMADB_PORT: ${CHROMADB_PORT}
CHROMADB_COLLECTION_TEMPLATE: ${CHROMADB_COLLECTION_TEMPLATE}
CHROMADB_DISTANCE_CUTOFF: ${CHROMADB_DISTANCE_CUTOFF}
ASSISTANT_PORT: ${ASSISTANT_PORT}
depends_on:
- rabbitmq
- chromadb
command: ["./run.sh"]
volumes:
- ./assistant:/app:delegated
- ./packages/Akvo_rabbitmq_client:/lib/Akvo_rabbitmq_client:delegated
- ./.cache/assistant:/root/.cache:delegated
- ./setup.cfg:/app/setup.cfg:ro
eppo-librarian:
image: python:3.12.3
working_dir: /app
environment:
EPPO_COUNTRY_ORGANISM_URL: ${EPPO_COUNTRY_ORGANISM_URL}
EPPO_DATASHEET_URL: ${EPPO_DATASHEET_URL}
EPPO_COUNTRIES: ${EPPO_COUNTRIES}
ASSISTANT_LANGUAGES: ${ASSISTANT_LANGUAGES}
OPENAI_API_KEY: ${OPENAI_API_KEY}
OPENAI_CHAT_MODEL: ${OPENAI_CHAT_MODEL}
PLAIN_TEXT_SYSTEM_PROMPT: ${PLAIN_TEXT_SYSTEM_PROMPT}
PLAIN_TEXT_PROMPT: ${PLAIN_TEXT_PROMPT}
CHROMADB_HOST: ${CHROMADB_HOST}
CHROMADB_PORT: ${CHROMADB_PORT}
CHROMADB_COLLECTION_TEMPLATE: ${CHROMADB_COLLECTION_TEMPLATE}
CHUNK_SIZE: ${CHUNK_SIZE}
OVERLAP_SIZE: ${OVERLAP_SIZE}
EPPO_PORT: ${EPPO_PORT}
depends_on:
- chromadb
command: ["./run.sh"]
volumes:
- ./eppo-librarian:/app:delegated
- eppo-cache:/data/cache:delegated
restart: no
chromadb:
image: chromadb/chroma:0.5.5
ports:
- ${CHROMADB_PORT}:${CHROMADB_PORT}
environment:
IS_PERSISTENT: True
ANONYMIZED_TELEMETRY: False
volumes:
- chromadb-data:/chroma/chroma
rabbitmq:
image: rabbitmq:management
ports:
- ${RABBITMQ_PORT}:${RABBITMQ_PORT}
- ${RABBITMQ_MANAGEMENT_PORT}:${RABBITMQ_MANAGEMENT_PORT}
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASS}
volumes:
- rabbitmq-data:/var/lib/rabbitmq/mnesia/
postgres:
image: postgres:12-alpine
ports:
- ${POSTGRES_PORT}:${POSTGRES_PORT}
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASS}
volumes:
- ./postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d
- ./postgres/script:/script:ro
- pg-data:/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4:8.6
ports:
- ${PGADMIN_PORT}:${PGADMIN_PORT}
environment:
PGADMIN_LISTEN_PORT: ${PGADMIN_PORT}
PGADMIN_DEFAULT_EMAIL: dev@akvo.org
PGADMIN_DEFAULT_PASSWORD: ${POSTGRES_PASS}
volumes:
- ./postgres/pgadmin4/servers.json:/pgadmin4/servers.json
- pg-admin-data:/var/lib/pgadmin
depends_on:
- postgres
backend:
image: python:3.12.3
working_dir: /app
environment:
<<: *rabbitmq_client_env
DATABASE_URL: postgresql://akvo:${POSTGRES_PASS}@postgres:${POSTGRES_PORT}/dev
BACKEND_PORT: ${BACKEND_PORT}
JWT_SECRET: ${JWT_SECRET}
WEBDOMAIN: "${WEBDOMAIN}:${FRONTEND_PORT}"
MAGIC_LINK_CHAT_TEMPLATE: ${MAGIC_LINK_CHAT_TEMPLATE}
INITIAL_CHAT_TEMPLATE: ${INITIAL_CHAT_TEMPLATE}
TWILIO_ACCOUNT_SID: ${TWILIO_ACCOUNT_SID}
TWILIO_AUTH_TOKEN: ${TWILIO_AUTH_TOKEN}
TWILIO_WHATSAPP_NUMBER: ${TWILIO_WHATSAPP_NUMBER}
VERIFICATION_TEMPLATE_ID_en: ${VERIFICATION_TEMPLATE_ID_en}
VERIFICATION_TEMPLATE_ID_sw: ${VERIFICATION_TEMPLATE_ID_sw}
VERIFICATION_TEMPLATE_ID_fr: ${VERIFICATION_TEMPLATE_ID_fr}
BROADCAST_TEMPLATE_ID_en: ${BROADCAST_TEMPLATE_ID_en}
BROADCAST_TEMPLATE_ID_sw: ${BROADCAST_TEMPLATE_ID_sw}
BROADCAST_TEMPLATE_ID_fr: ${BROADCAST_TEMPLATE_ID_fr}
INTRO_TEMPLATE_ID_en: ${INTRO_TEMPLATE_ID_en}
INTRO_TEMPLATE_ID_sw: ${INTRO_TEMPLATE_ID_sw}
INTRO_TEMPLATE_ID_fr: ${INTRO_TEMPLATE_ID_fr}
CONVERSATION_RECONNECT_TEMPLATE_en: ${CONVERSATION_RECONNECT_TEMPLATE_en}
CONVERSATION_RECONNECT_TEMPLATE_sw: ${CONVERSATION_RECONNECT_TEMPLATE_sw}
CONVERSATION_RECONNECT_TEMPLATE_fr: ${CONVERSATION_RECONNECT_TEMPLATE_fr}
SLACK_BOT_TOKEN: ${SLACK_BOT_TOKEN}
SLACK_SIGNING_SECRET: ${SLACK_SIGNING_SECRET}
BUCKET_NAME: ${BUCKET_NAME}
LAST_MESSAGES_LIMIT: ${LAST_MESSAGES_LIMIT}
ASSISTANT_LAST_MESSAGES_LIMIT: ${ASSISTANT_LAST_MESSAGES_LIMIT}
GOOGLE_APPLICATION_CREDENTIALS: /credentials/${GOOGLE_APPLICATION_CREDENTIALS}
NEXT_PUBLIC_VAPID_PUBLIC_KEY: ${NEXT_PUBLIC_VAPID_PUBLIC_KEY}
NEXT_PUBLIC_VAPID_PRIVATE_KEY: ${NEXT_PUBLIC_VAPID_PRIVATE_KEY}
CHROMADB_HOST: ${CHROMADB_HOST}
CHROMADB_PORT: ${CHROMADB_PORT}
ASSISTANT_PORT: ${ASSISTANT_PORT}
EPPO_PORT: ${EPPO_PORT}
command: ["./dev.sh"]
volumes:
- ./backend:/app:delegated
- ./setup.cfg:/app/setup.cfg:ro
- ./packages/Akvo_rabbitmq_client:/lib/Akvo_rabbitmq_client:delegated
- ${GOOGLE_APPLICATION_CREDENTIALS_PATH}:/credentials/:ro
depends_on:
- postgres
- rabbitmq
frontend:
image: akvo/akvo-node-18-alpine:20230831.105309.b9593b7
working_dir: /app
environment:
FRONTEND_PORT: ${FRONTEND_PORT}
BACKEND_PORT: ${BACKEND_PORT}
NEXT_PUBLIC_VAPID_PUBLIC_KEY: ${NEXT_PUBLIC_VAPID_PUBLIC_KEY}
NEXT_PUBLIC_VAPID_PRIVATE_KEY: ${NEXT_PUBLIC_VAPID_PRIVATE_KEY}
ports:
- ${FRONTEND_PORT}:${FRONTEND_PORT}
command: ["./dev.sh"]
volumes:
- ./frontend:/app:delegated
depends_on:
- backend
packages:
image: python:3.12.3
working_dir: /app
environment:
<<: *rabbitmq_client_env
command: ["./tests.sh"]
volumes:
- ./packages:/app:delegated
depends_on:
- rabbitmq
volumes:
pg-data:
pg-admin-data:
rabbitmq-data:
chromadb-data:
eppo-cache: