-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
242 lines (222 loc) · 6.5 KB
/
docker-compose.yml
File metadata and controls
242 lines (222 loc) · 6.5 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
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
services:
db:
container_name: cometa_postgres
platform: linux/amd64 # <-- Force AMD64
image: postgres:12.1
volumes:
- ./data/db_data:/var/lib/postgresql/data
expose:
- "5532"
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres", "-d", "postgres"]
interval: 10s
timeout: 5s
retries: 3
start_period: 10s
logging:
driver: json-file
networks:
- testing
restart: always
django:
container_name: cometa_django
image: cometa/django:latest
platform: linux/amd64 #
pull_policy: always
restart: always
user: "0" # This forces the container to run as root
logging:
driver: json-file
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data/cometa/screenshots:/data/screenshots
- ./data/cometa/backups:/data/backups:rw
- ./data/cometa/videos:/data/videos
- ./data/cometa/downloads:/data/downloads:rw
- ./data/cometa/uploads:/data/uploads:rw
- ./data/cometa/pdf:/code/behave/pdf:rw
- ./data/cometa/backups/features:/code/backups/features:rw
- ./data/cometa/config:/code/config:rw
- ./data/department_data:/data/department_data:rw
- ./data/behave/logs:/opt/code/behave_logs:rw
- ./data/django/migrations:/opt/code/migrations:rw
- ./data/django/logs:/opt/code/logs:rw
- ./data/django/clamav:/var/lib/clamav:rw
- ./data/share:/code:rw
working_dir: /opt/code
healthcheck:
test: ["CMD", "curl", "-s", "http://localhost:8000/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 60s
environment:
- PYTHONUNBUFFERED=1
expose:
- "8000"
depends_on:
db:
condition: service_healthy
networks:
- testing
behave:
container_name: cometa_behave
platform: linux/amd64 # <-- Force AMD64
image: cometa/behave:latest
pull_policy: always
restart: always
user: "0" # This forces the container to run as root
logging:
driver: json-file
expose:
- "8001"
depends_on:
redis:
condition: service_healthy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./data/cometa/screenshots:/data/screenshots
- ./data/cometa/videos:/data/videos
- ./data/cometa/downloads:/data/test/downloads
- ./data/cometa/uploads:/data/test/uploads
- ./data/cometa/html:/data/test/html
- ./data/cometa/config:/code/config:rw
- ./data/behave/logs:/opt/code/behave_logs:rw
- ./data/department_data:/data/department_data:rw
- ./data/redis/certs:/share/certs
- ./data/share/code/behave/logs:/data/logs
# - ./backend/behave:/opt/code:rw
working_dir: /opt/code/behave_django
environment:
PYTHONUNBUFFERED: 1
networks:
- testing
ws:
container_name: cometa_socket
image: cometa/socket:latest
platform: linux/amd64 # <-- Force AMD64
pull_policy: always
restart: always
environment:
- NODE_ENV=production
- NPM_CONFIG_LOGLEVEL=info
expose:
- "3001"
healthcheck:
test: ["CMD", "curl", "-s", "http://localhost:3001/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
logging:
driver: json-file
networks:
- testing
# selenoid:
# # Please use ./selenoid/deploy_selenoid.sh to create necessary files of Selenoid
# image: aerokube/selenoid:1.11.2
# platform: linux/amd64 # <-- Force AMD64
# container_name: cometa_selenoid
# logging:
# driver: json-file
# ports:
# - 4444:4444
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# - ./backend/selenoid/:/etc/selenoid/:rw
# - ./data/cometa/config/images:/code/config/images:rw
# - ./data/cometa/videos:/opt/selenoid/video
# environment:
# TZ: Europe/Berlin
# OVERRIDE_VIDEO_OUTPUT_DIR: ${PWD}/data/cometa/videos
# networks:
# - testing
# restart: always
# entrypoint: sh /etc/selenoid/start.sh
novnc:
image: cometa/novnc:1.6
platform: linux/amd64 # <-- Force AMD64
pull_policy: always
restart: always
container_name: cometa_novnc
networks:
- testing
logging:
driver: json-file
crontab:
container_name: cometa_crontab
image: cometa/scheduler:latest
platform: linux/amd64 # <-- Force AMD64
pull_policy: always
restart: always
environment:
CRONTAB_SERVER_URL: "crontab"
CRONTAB_SERVER_PORT: "8080"
SCHEDULER_HOST: "crontab"
SCHEDULER_PORT: "8080"
networks:
- testing
logging:
driver: json-file
# Since this a deployment file, build image is used to start cometa_front
# n the build pipeline
apache:
image: "cometa/front:latest"
platform: linux/amd64
pull_policy: always
restart: always
user: "0" # This forces the container to run as root
container_name: cometa_front
logging:
driver: json-file
volumes:
- ./data/front/apache2/metadata:/usr/local/apache2/conf/metadata
# httpd.conf file and paths.conf file are kept during build,
# cometa_conf folder is only mapped for openidc.conf file
- ./data/front/apache2/conf:/usr/local/apache2/cometa_conf
- ./data/front/apache2/certs:/share/apache2/certs
- ./data/cometa/screenshots:/screenshots
- ./data/cometa/videos:/videos
- ./front/apache2:/code/front/apache2
# Use below line to mount the company logo in the login page
# - /share/front/apache2/icons/{{COMPANY}}.svg:/usr/local/apache2/htdocs/assets/icons/{{COMPANY}}.svg
working_dir: /code/front
privileged: true
ports:
- "<outside_port>:80"
- "443:443"
entrypoint: bash /code/front/start_server.sh
healthcheck:
test: ["CMD", "curl", "-s", "-k", "http://localhost/welcome.html"]
interval: 10s
timeout: 5s
retries: 3
start_period: 6s
environment:
- DJANGO_SERVER_URL=django
- DJANGO_SERVER_PORT=8000
- SOCKET_SERVER_URL=ws
- SOCKET_SERVER_PORT=3001
- NOVNC_SERVER_URL=novnc
- NOVNC_SERVER_PORT=80
networks:
- testing
redis:
container_name: cometa_redis
image: redis:7.2.0
platform: linux/amd64 # <-- Force AMD64
pull_policy: always
restart: always
volumes:
- ./data/redis/data:/data
networks:
- testing
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
logging:
driver: json-file
networks:
testing:
driver: "bridge"
volumes:
redis_data: