-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.testing.yml
181 lines (172 loc) · 4.34 KB
/
docker-compose.testing.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
# For copyright and license terms, see COPYRIGHT.rst (top level of repository)
# Repository: https://github.com/C3S/collecting_society_docker
networks:
test_frontend:
test_backend:
volumes:
test_postgresql_data:
test_echoprint_data:
test_trytond_files:
services:
test_database:
build:
context: ./services/build
target: database
args: &buildargs
ENVIRONMENT: ${ENVIRONMENT}
WORKDIR: ${WORKDIR}
TRYTON_VERSION: ${TRYTON_VERSION}
DEBUGGER_WINPDB: ${DEBUGGER_WINPDB}
DEBUGGER_DEBUGPY: ${DEBUGGER_DEBUGPY}
networks:
- test_backend
healthcheck:
test: /shared/healthcheck/database
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./volumes/shared:/shared
- test_postgresql_data:/var/lib/postgresql/data
env_file:
- services/database.env
environment:
SERVICE: database
test_erpserver:
build:
context: ./services/build
target: erpserver
args: *buildargs
command: service-deploy
networks:
- test_backend
healthcheck:
test: /shared/healthcheck/erpserver
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./volumes/shared:/shared
depends_on:
test_database:
condition: service_healthy
test_fingerprint:
condition: service_started
env_file:
- .env
- services/erpserver.env
environment:
SERVICE: erpserver
ENVIRONMENT: testing
POSTGRES_HOSTNAME: test_${POSTGRES_HOSTNAME}
TRYTON_DATABASE: ${TRYTON_DATABASE}_test
test_web:
build:
context: ./services/build
target: webgui
args: *buildargs
command: tail -f /dev/null
networks:
- test_frontend
- test_backend
ports:
- "127.0.0.1:52003:52003" # debugger
volumes:
- ./volumes/shared:/shared
- test_trytond_files:/var/lib/trytond
depends_on:
test_database:
condition: service_healthy
test_browser:
condition: service_healthy
env_file:
- .env
- services/webapi.env
- services/webgui.env
- services/erpserver.env
environment:
SERVICE: webgui
ENVIRONMENT: testing
TRYTON_HOSTNAME: test_${TRYTON_HOSTNAME}
TRYTON_DATABASE: ${TRYTON_DATABASE}_test
DB_NAME: ${TRYTON_DATABASE}_test
TRYTOND_CONFIG: /shared/config/trytond/testing.conf
POSTGRES_HOSTNAME: test_${POSTGRES_HOSTNAME}
WEBAPI_URL: http://test_web:6545
WEBAPI_CORS: http://test_web:6544
test_worker:
build:
context: ./services/build
target: worker
args: *buildargs
# cpu_percent: 50
mem_limit: 500m
command: tail -f /dev/null
healthcheck:
test: /shared/healthcheck/worker
interval: 5m
timeout: 5s
retries: 5
networks:
- test_backend
volumes:
- ./volumes/shared:/shared
depends_on:
test_erpserver:
condition: service_healthy
test_fingerprint:
condition: service_started
env_file:
- .env
- services/worker.env
environment:
SERVICE: worker
ENVIRONMENT: testing
TRYTON_HOSTNAME: test_${TRYTON_HOSTNAME}
TRYTON_DATABASE: ${TRYTON_DATABASE}_test
POSTGRES_HOSTNAME: test_${POSTGRES_HOSTNAME}
PGPASSWORD: s0secret!!
ECHOPRINT_HOSTNAME: test_${ECHOPRINT_HOSTNAME}
DEBUGGER_WINPDB: 0
DEBUGGER_DEBUGPY: 0
test_browser:
build:
context: ./services/build
target: browser
args:
ENVIRONMENT: ${ENVIRONMENT}
WORKDIR: ${WORKDIR}
DEBUGGER_WINPDB: ${DEBUGGER_WINPDB}
DEBUGGER_DEBUGPY: ${DEBUGGER_DEBUGPY}
healthcheck:
test: /opt/bin/check-grid.sh --host 0.0.0.0 --port 4444
interval: 15s
timeout: 30s
retries: 5
volumes:
- /dev/shm:/dev/shm
networks:
- test_frontend
environment:
SERVICE: browser
test_fingerprint:
build:
context: ./services/build
target: fingerprint
args: *buildargs
command: service-deploy
healthcheck:
test: /shared/healthcheck/fingerprint
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./volumes/shared:/shared
- test_echoprint_data:/opt/echoprint-data
networks:
- test_backend
env_file:
- .env
environment:
SERVICE: fingerprint
ENVIRONMENT: testing