-
Notifications
You must be signed in to change notification settings - Fork 73
/
docker-compose-testing.yml
224 lines (213 loc) · 8.89 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
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
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
frontend:
image: ${REGISTRY}/auction-frontend:${IMAGE_TAG}
environment:
REACT_APP_AUTH_URL: http://api.localhost
networks:
- traefik-public
- default
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.http.routers.frontend.rule=Host(`localhost`) || Host(`www.localhost`)
- traefik.http.routers.frontend.entryPoints=http
- traefik.http.services.frontend.loadBalancer.server.port=80
- traefik.http.middlewares.frontend-redirect.redirectRegex.regex=^(https?://)www.localhost/(.*)$$
- traefik.http.middlewares.frontend-redirect.redirectRegex.replacement=$${1}localhost/$${2}
- traefik.http.middlewares.frontend-redirect.redirectRegex.permanent=true
- traefik.http.routers.frontend.middlewares=frontend-redirect
api:
image: ${REGISTRY}/auction-api:${IMAGE_TAG}
networks:
- traefik-public
- default
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.http.routers.api.rule=Host(`api.localhost`)
- traefik.http.routers.api.entryPoints=http
- traefik.http.services.api.loadBalancer.server.port=80
api-php-fpm:
image: ${REGISTRY}/auction-api-php-fpm:${IMAGE_TAG}
environment:
APP_ENV: prod
APP_DEBUG: 0
DB_HOST: api-postgres
DB_USER: app
DB_PASSWORD_FILE: /run/secrets/api_db_password
DB_NAME: app
MAILER_HOST: mailer
MAILER_PORT: 1025
MAILER_USERNAME: app
MAILER_PASSWORD_FILE: /run/secrets/api_mailer_password
MAILER_FROM_EMAIL: [email protected]
FRONTEND_URL: http://localhost
SENTRY_DSN_FILE: /run/secrets/sentry_dsn
JWT_ENCRYPTION_KEY_FILE: /run/secrets/jwt_encryption_key
JWT_PUBLIC_KEY_PATH: /run/secrets/jwt_public_key
JWT_PRIVATE_KEY_PATH: /run/secrets/jwt_private_key
OAUTH_CALLBACK_URL: http://api.localhost
OAUTH_YANDEX_AUTH_URL: http://wiremock.localhost/oauth.yandex.ru
OAUTH_YANDEX_TOKEN_URL: http://wiremock/oauth.yandex.ru
OAUTH_YANDEX_API_URL: http://wiremock/login.yandex.ru
OAUTH_YANDEX_CLIENT_ID: app
OAUTH_YANDEX_CLIENT_SECRET_FILE: /run/secrets/oauth_yandex_client_secret
OAUTH_MAILRU_AUTH_URL: http://wiremock.localhost/oauth.mail.ru
OAUTH_MAILRU_TOKEN_URL: http://wiremock/oauth.mail.ru
OAUTH_MAILRU_API_URL: http://wiremock/oauth.mail.ru
OAUTH_MAILRU_CLIENT_ID: app
OAUTH_MAILRU_CLIENT_SECRET_FILE: /run/secrets/oauth_mailru_client_secret
secrets:
- api_db_password
- api_mailer_password
- sentry_dsn
- jwt_encryption_key
- jwt_public_key
- jwt_private_key
- oauth_yandex_client_secret
- oauth_mailru_client_secret
api-php-cli:
image: ${REGISTRY}/auction-api-php-cli:${IMAGE_TAG}
environment:
APP_ENV: prod
APP_DEBUG: 0
DB_HOST: api-postgres
DB_USER: app
DB_PASSWORD_FILE: /run/secrets/api_db_password
DB_NAME: app
MAILER_HOST: mailer
MAILER_PORT: 1025
MAILER_USERNAME: app
MAILER_PASSWORD_FILE: /run/secrets/api_mailer_password
MAILER_FROM_EMAIL: [email protected]
FRONTEND_URL: http://localhost
SENTRY_DSN_FILE: /run/secrets/sentry_dsn
JWT_ENCRYPTION_KEY_FILE: /run/secrets/jwt_encryption_key
JWT_PUBLIC_KEY_PATH: /run/secrets/jwt_public_key
JWT_PRIVATE_KEY_PATH: /run/secrets/jwt_private_key
OAUTH_CALLBACK_URL: http://api.localhost
OAUTH_YANDEX_AUTH_URL: http://wiremock.localhost/oauth.yandex.ru
OAUTH_YANDEX_TOKEN_URL: http://wiremock/oauth.yandex.ru
OAUTH_YANDEX_API_URL: http://wiremock/login.yandex.ru
OAUTH_YANDEX_CLIENT_ID: app
OAUTH_YANDEX_CLIENT_SECRET_FILE: /run/secrets/oauth_yandex_client_secret
OAUTH_MAILRU_AUTH_URL: http://wiremock.localhost/oauth.mail.ru
OAUTH_MAILRU_TOKEN_URL: http://wiremock/oauth.mail.ru
OAUTH_MAILRU_API_URL: http://wiremock/oauth.mail.ru
OAUTH_MAILRU_CLIENT_ID: app
OAUTH_MAILRU_CLIENT_SECRET_FILE: /run/secrets/oauth_mailru_client_secret
secrets:
- api_db_password
- api_mailer_password
- sentry_dsn
- jwt_encryption_key
- jwt_public_key
- jwt_private_key
- oauth_yandex_client_secret
- oauth_mailru_client_secret
testing-api-php-cli:
image: ${REGISTRY}/auction-testing-api-php-cli:${IMAGE_TAG}
environment:
APP_ENV: dev
APP_DEBUG: 1
DB_HOST: api-postgres
DB_USER: app
DB_PASSWORD_FILE: /run/secrets/api_db_password
DB_NAME: app
MAILER_HOST: mailer
MAILER_PORT: 1025
MAILER_USERNAME: app
MAILER_PASSWORD_FILE: /run/secrets/api_mailer_password
MAILER_FROM_EMAIL: [email protected]
FRONTEND_URL: http://localhost
SENTRY_DSN_FILE: /run/secrets/sentry_dsn
JWT_ENCRYPTION_KEY_FILE: /run/secrets/jwt_encryption_key
JWT_PUBLIC_KEY_PATH: /run/secrets/jwt_public_key
JWT_PRIVATE_KEY_PATH: /run/secrets/jwt_private_key
OAUTH_CALLBACK_URL: http://api.localhost
OAUTH_YANDEX_AUTH_URL: http://wiremock.localhost/oauth.yandex.ru
OAUTH_YANDEX_TOKEN_URL: http://wiremock/oauth.yandex.ru
OAUTH_YANDEX_API_URL: http://wiremock/login.yandex.ru
OAUTH_YANDEX_CLIENT_ID: app
OAUTH_YANDEX_CLIENT_SECRET_FILE: /run/secrets/oauth_yandex_client_secret
OAUTH_MAILRU_AUTH_URL: http://wiremock.localhost/oauth.mail.ru
OAUTH_MAILRU_TOKEN_URL: http://wiremock/oauth.mail.ru
OAUTH_MAILRU_API_URL: http://wiremock/oauth.mail.ru
OAUTH_MAILRU_CLIENT_ID: app
OAUTH_MAILRU_CLIENT_SECRET_FILE: /run/secrets/oauth_mailru_client_secret
secrets:
- api_db_password
- api_mailer_password
- sentry_dsn
- jwt_encryption_key
- jwt_public_key
- jwt_private_key
- oauth_yandex_client_secret
- oauth_mailru_client_secret
api-postgres:
image: postgres:13.3-alpine
environment:
POSTGRES_USER: app
POSTGRES_PASSWORD_FILE: /run/secrets/api_db_password
POSTGRES_DB: app
secrets:
- api_db_password
mailer:
image: mailhog/mailhog
wiremock:
image: wiremock/wiremock:3x-alpine
networks:
- traefik-public
- default
volumes:
- ./wiremock:/home/wiremock
healthcheck:
test: wget --no-verbose --tries=1 --spider http://localhost/__admin/health || exit 1
command:
- '--port=80'
- '--global-response-templating'
- '--verbose'
labels:
- traefik.enable=true
- traefik.docker.network=traefik-public
- traefik.http.routers.wiremock.rule=Host(`wiremock.localhost`)
- traefik.http.services.wiremock.loadBalancer.server.port=80
- traefik.http.routers.wiremock.entryPoints=http
cucumber-node-cli:
image: ${REGISTRY}/auction-cucumber-node-cli:${IMAGE_TAG}
volumes:
- ./cucumber/var:/app/var
network_mode: service:traefik
secrets:
api_db_password:
file: ./docker/development/secrets/api_db_password
api_mailer_password:
file: ./docker/development/secrets/api_mailer_password
sentry_dsn:
file: ./docker/development/secrets/sentry_dsn
jwt_encryption_key:
file: ./docker/development/secrets/jwt_encryption_key
jwt_public_key:
file: ./docker/development/secrets/jwt_public_key
jwt_private_key:
file: ./docker/development/secrets/jwt_private_key
oauth_yandex_client_secret:
file: ./docker/development/secrets/oauth_yandex_client_secret
oauth_mailru_client_secret:
file: ./docker/development/secrets/oauth_mailru_client_secret
networks:
traefik-public:
name: traefik-public