-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose-testing.yml
191 lines (180 loc) · 6.08 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
182
183
184
185
186
187
188
189
190
191
services:
traefik:
image: traefik:2.11
command:
--providers.docker=true
--providers.docker.exposedbydefault=false
--entrypoints.http.address=:80
networks:
- traefik-public
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
site:
image: ${REGISTRY}/site:${IMAGE_TAG}
networks:
- traefik-public
- default
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.http.routers.site.rule=Host(`localhost`)
- traefik.http.routers.site.entrypoints=http
- traefik.http.services.site.loadbalancer.server.port=80
site-php-fpm:
image: ${REGISTRY}/site-php-fpm:${IMAGE_TAG}
environment:
PHP_IDE_CONFIG: serverName=SITE
APP_DEBUG: 0
APP_ENV: prod
APP_URL: http://localhost
APP_CAPTCHA_CODE: 42
COOKIE_SECRET_FILE: /run/secrets/cookie_secret
DB_HOST: site-mysql
DB_NAME: app
DB_USERNAME: app
DB_PASSWORD_FILE: /run/secrets/db_password
REDIS_HOST: site-redis
REDIS_PASSWORD_FILE: /run/secrets/redis_password
MAILER_HOST: site-mailer
MAILER_PORT: 1025
MAILER_USERNAME: app
MAILER_PASSWORD_FILE: /run/secrets/mailer_password
MAILER_FROM_EMAIL: [email protected]
DEWORKER_API_URL: http://site-wiremock/api.deworker.pro
SENTRY_DSN_FILE: /run/secrets/sentry_dsn
secrets:
- cookie_secret
- db_password
- redis_password
- mailer_password
- sentry_dsn
site-php-cli:
image: ${REGISTRY}/site-php-cli:${IMAGE_TAG}
environment:
APP_DEBUG: 0
APP_ENV: prod
APP_URL: http://localhost
COOKIE_SECRET_FILE: /run/secrets/cookie_secret
DB_HOST: site-mysql
DB_NAME: app
DB_USERNAME: app
DB_PASSWORD_FILE: /run/secrets/db_password
REDIS_HOST: site-redis
REDIS_PASSWORD_FILE: /run/secrets/redis_password
MAILER_HOST: site-mailer
MAILER_PORT: 1025
MAILER_USERNAME: app
MAILER_PASSWORD_FILE: /run/secrets/mailer_password
MAILER_FROM_EMAIL: [email protected]
DEWORKER_API_URL: http://site-wiremock/api.deworker.pro
SENTRY_DSN_FILE: /run/secrets/sentry_dsn
secrets:
- cookie_secret
- db_password
- redis_password
- mailer_password
- sentry_dsn
network_mode: service:site
testing-site-php-cli:
image: ${REGISTRY}/site-testing-php-cli:${IMAGE_TAG}
environment:
APP_DEBUG: 1
APP_ENV: dev
APP_URL: http://localhost
COOKIE_SECRET_FILE: /run/secrets/cookie_secret
DB_HOST: site-mysql
DB_NAME: app
DB_USERNAME: app
DB_PASSWORD_FILE: /run/secrets/db_password
REDIS_HOST: site-redis
REDIS_PASSWORD_FILE: /run/secrets/redis_password
MAILER_HOST: site-mailer
MAILER_PORT: 1025
MAILER_USERNAME: app
MAILER_PASSWORD_FILE: /run/secrets/mailer_password
MAILER_FROM_EMAIL: [email protected]
DEWORKER_API_URL: http://site-wiremock/api.deworker.pro
SENTRY_DSN_FILE: /run/secrets/sentry_dsn
volumes:
- ./tests/_output:/app/tests/_output
secrets:
- cookie_secret
- db_password
- redis_password
- mailer_password
- sentry_dsn
network_mode: service:site
site-mysql:
image: mariadb:11
volumes:
- site-mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD_FILE: /run/secrets/db_root_password
MYSQL_USER: app
MYSQL_PASSWORD_FILE: /run/secrets/db_password
MYSQL_DATABASE: app
secrets:
- db_root_password
- db_password
site-redis:
image: ${REGISTRY}/site-redis:7.0
environment:
REDIS_PASSWORD_FILE: /run/secrets/redis_password
secrets:
- redis_password
volumes:
- site-redis:/data
command:
- 'redis-server'
- '--maxmemory 32mb'
- '--maxmemory-policy allkeys-lru'
site-mailer:
image: mailhog/mailhog
networks:
- traefik-public
- default
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.http.routers.site-mailer.rule=Host(`mailer.localhost`)
- traefik.http.routers.site-mailer.entrypoints=http
- traefik.http.services.site-mailer.loadbalancer.server.port=80
site-wiremock:
image: wiremock/wiremock:3.10.0-alpine
networks:
- traefik-public
- default
volumes:
- ./wiremock:/home/wiremock
command:
- '--port=80'
- '--global-response-templating'
- '--verbose'
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.http.routers.site-wiremock.rule=Host(`wiremock.localhost`)
- traefik.http.routers.site-wiremock.entrypoints=http
- traefik.http.services.site-wiremock.loadbalancer.server.port=80
secrets:
cookie_secret:
file: ./secrets/cookie_secret
db_password:
file: ./secrets/db_password
db_root_password:
file: ./secrets/db_root_password
redis_password:
file: ./secrets/redis_password
mailer_password:
file: ./secrets/mailer_password
sentry_dsn:
file: ./secrets/sentry_dsn
volumes:
site-mysql:
site-redis:
networks:
traefik-public:
name: traefik-public