-
Notifications
You must be signed in to change notification settings - Fork 5
/
docker-compose.yml
170 lines (160 loc) · 4.46 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
services:
db:
container_name: cometa_postgres
image: postgres:12.1
volumes:
- ./backend:/code
- ./backend/db_data:/var/lib/postgresql/data
expose:
- "5532"
networks:
- testing
restart: always
django:
container_name: cometa_django
image: python:3.9
logging:
driver: json-file
command: bash start.sh
volumes:
- /data/cometa/screenshots:/code/behave/screenshots
- /data/cometa/videos:/code/behave/videos
- /data/cometa/pdf:/code/behave/pdf
- /data/cometa/downloads:/code/behave/downloads
- ./backend:/code
- ./backend/src:/opt/code:rw
- "./backend/crontabs/cometa_django_crontab:/etc/cron.d/crontab"
working_dir: /opt/code
environment:
- PYTHONUNBUFFERED=1
expose:
- "8000"
depends_on:
- db
links:
- behave:cometabehave.local
networks:
- testing
restart: always
behave:
container_name: cometa_behave
image: python:3.9
logging:
driver: json-file
expose:
- "8001"
depends_on:
redis:
condition: service_healthy
volumes:
- /data/cometa/screenshots:/opt/code/screenshots
- /data/cometa/videos:/opt/code/videos
- /data/cometa/pdf:/code/behave/pdf
- /data/cometa/downloads:/code/behave/downloads
- /data/redis/certs:/share/certs
- ./backend/behave:/opt/code:rw
- ./backend:/code
- "./backend/behave/schedules/crontab:/etc/cron.d/crontab"
command: /opt/code/entry.sh
working_dir: /opt/code/behave_django
environment:
PYTHONUNBUFFERED: 1
networks:
- testing
restart: always
ws:
container_name: cometa_socket
image: node:14
working_dir: /home/node/app
logging:
driver: json-file
environment:
- NODE_ENV=production
- NPM_CONFIG_LOGLEVEL=info
volumes:
- ./backend/ws-server:/home/node/app:rw
expose:
- "5532"
command: "npm run-script start"
networks:
- testing
restart: always
selenoid:
# Please use ./selenoid/deploy_selenoid.sh to create necessary files of Selenoid
image: aerokube/selenoid:1.11.2
container_name: cometa_selenoid
logging:
driver: json-file
expose:
- "5532"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./backend/selenoid/:/etc/selenoid/:ro
- /data/cometa/videos:/opt/selenoid/video
environment:
TZ: Europe/Berlin
OVERRIDE_VIDEO_OUTPUT_DIR: ${PWD}/data/cometa/videos
networks:
- testing
restart: always
# entrypoint with limit on browser executions to CPU-2 or Defaulting to 2 if number is less then 2
entrypoint: sh -c "LIMIT=$$(($$(nproc)-2)) && LIMIT=$$((LIMIT > 2 ? $$LIMIT:2)) && /usr/bin/selenoid \
-listen :4444 \
-conf /etc/selenoid/browsers.json \
-video-output-dir /opt/selenoid/video \
-log-output-dir /opt/selenoid/logs \
-container-network cometa_testing \
-limit $$LIMIT"
novnc:
image: cometa/novnc:1.0
container_name: cometa_novnc
networks:
- testing
restart: always
crontab:
image: cometa/scheduler:latest
container_name: cometa_crontab
environment:
CRONTAB_SERVER_URL: "crontab"
CRONTAB_SERVER_PORT: "8080"
SCHEDULER_HOST: "crontab"
SCHEDULER_PORT: "8080"
networks:
- testing
restart: always
# Since this a deployment file, build image is used to spinup cometa_front
# n the build pipeline
apache:
image: "cometa/front:latest"
container_name: cometa_front
volumes:
- ./front/apache-conf/metadata:/code/front/apache-conf/metadata
- ./front/apache-conf/httpd.conf:/usr/local/apache2/conf/httpd.conf
- ./front/apache-conf/openidc.conf_<server>:/usr/local/apache2/conf/openidc.conf
- ./front/apache-conf/paths.conf:/usr/local/apache2/conf/paths.conf
- ./front/apache-conf/mod_auth_openidc.so:/usr/local/apache2/modules/mod_auth_openidc.so
- /data/cometa/screenshots:/screenshots
working_dir: /code/front
privileged: true
ports:
- "<outside_port>:80"
- "443:443"
entrypoint: bash /code/front/start_server.sh
networks:
- testing
restart: always
redis:
image: redis:7.2.0-alpine
container_name: cometa_redis
volumes:
- redis_data:/data
networks:
- testing
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
restart: always
networks:
testing:
driver: "bridge"
volumes:
redis_data: