-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathdocker-compose.test.yml
194 lines (161 loc) · 4.42 KB
/
docker-compose.test.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
188
189
190
191
192
193
194
services:
status:
build:
context: .
dockerfile: status.Dockerfile
ports:
- "8080:8080"
postgres:
build:
context: .
dockerfile: postgres.Dockerfile
command: >
postgres
-c shared_preload_libraries=pg_stat_statements
-c pg_stat_statements.track=all
ports:
- "5433:5432"
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
POSTGRES_DB: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 1s
timeout: 1s
retries: 60
api:
build:
context: .
dockerfile: api.Dockerfile
depends_on:
postgres:
condition: service_healthy
ports:
- "5000:5000"
volumes:
- ./test:/app/test:ro
environment:
DUO_ENV: dev
DUO_SMTP_HOST: smtp
DUO_SMTP_PORT: 1025
DUO_SMTP_USER: unused-in-dev-env
DUO_SMTP_PASS: unused-in-dev-env
DUO_REPORT_EMAIL: [email protected] 20 [email protected] 10
DUO_DB_HOST: postgres
DUO_DB_PORT: 5432
DUO_DB_USER: postgres
DUO_DB_PASS: password
DUO_CORS_ORIGINS: '*'
DUO_R2_BUCKET_NAME: s3-mock-bucket
DUO_R2_AUDIO_BUCKET_NAME: s3-mock-audio-bucket
DUO_R2_ACCT_ID: unused-in-dev-env
DUO_R2_ACCESS_KEY_ID: s3-mock-access-key-id
DUO_R2_ACCESS_KEY_SECRET: s3-mock-secret-access-key-secret
DUO_BOTO_ENDPOINT_URL: http://s3mock:9090
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 3
chat:
build:
context: .
dockerfile: chat.Dockerfile
depends_on:
postgres:
condition: service_healthy
ports:
- "5442:5442"
- "5443:5443"
environment:
DUO_API_HOST: http://api:5000
DUO_DB_HOST: postgres
DUO_DB_PORT: 5432
DUO_DB_USER: postgres
DUO_DB_PASS: password
DUO_CHAT_PORTS: '5443'
healthcheck:
test: ["CMD", "bash", "-c", "[[ -e /db-initialized ]]"]
interval: 30s
timeout: 10s
retries: 3
cron:
build:
context: .
dockerfile: cron.Dockerfile
ports:
- "8082:8080"
depends_on:
postgres:
condition: service_healthy
chat:
condition: service_healthy
api:
condition: service_healthy
volumes:
- ./test:/app/test
environment:
DUO_SMTP_HOST: smtp
DUO_SMTP_PORT: 1025
DUO_SMTP_USER: unused-in-dev-env
DUO_SMTP_PASS: unused-in-dev-env
DUO_DB_HOST: postgres
DUO_DB_PORT: 5432
DUO_DB_USER: postgres
DUO_DB_PASS: password
DUO_DB_CHAT_NAME: duo_chat
DUO_DB_API_NAME: duo_api
DUO_R2_BUCKET_NAME: s3-mock-bucket
DUO_R2_AUDIO_BUCKET_NAME: s3-mock-audio-bucket
DUO_R2_ACCT_ID: unused-in-dev-env
DUO_R2_ACCESS_KEY_ID: s3-mock-access-key-id
DUO_R2_ACCESS_KEY_SECRET: s3-mock-secret-access-key-secret
DUO_BOTO_ENDPOINT_URL: http://s3mock:9090
DUO_CRON_EMAIL_POLL_SECONDS: '1'
DUO_CRON_AUTODEACTIVATE2_DRY_RUN: 'false'
DUO_CRON_AUTODEACTIVATE2_POLL_SECONDS: '1'
DUO_CRON_INSERT_LAST_POLL_SECONDS: '1'
DUO_CRON_PHOTO_CLEANER_DRY_RUN: ${DUO_CRON_PHOTO_CLEANER_DRY_RUN:-false}
DUO_CRON_PHOTO_CLEANER_POLL_SECONDS: '1'
DUO_CRON_AUDIO_CLEANER_DRY_RUN: ${DUO_CRON_AUDIO_CLEANER_DRY_RUN:-false}
DUO_CRON_AUDIO_CLEANER_POLL_SECONDS: '1'
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
DUO_VERIFICATION_IMAGE_BASE_URL: http://s3mock:9090/s3-mock-bucket
DUO_VERIFICATION_MOCK_RESPONSE_FILE: test/input/verification-mock-response-file
DUO_CRON_GARBAGE_RECORDS_POLL_SECONDS: '1'
DUO_CRON_MAX_RANDOM_START_DELAY: '0'
s3mock:
image: adobe/s3mock
environment:
initialBuckets: s3-mock-bucket, s3-mock-audio-bucket
AWS_ACCESS_KEY_ID: s3-mock-access-key-id
AWS_SECRET_ACCESS_KEY: s3-mock-secret-access-key-secret
ports:
- 9090:9090
smtp:
image: mailhog/mailhog
ports:
- "1025:1025"
- "8025:8025"
pgadmin:
image: dpage/pgadmin4:7.3
ports:
- "8090:80"
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: password
chattest:
build:
context: .
dockerfile: chattest.Dockerfile
ports:
- "3000:3000"
redis:
image: "redis:alpine"
container_name: redis
ports:
- "6379:6379"
networks:
default:
driver: bridge