forked from deworkerpro/demo-auction
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-testing.yml
162 lines (152 loc) · 5.65 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
version: "3.9"
services:
traefik:
image: traefik:2.4
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
secrets:
- api_db_password
- api_mailer_password
- sentry_dsn
- jwt_encryption_key
- jwt_public_key
- jwt_private_key
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
secrets:
- api_db_password
- api_mailer_password
- sentry_dsn
- jwt_encryption_key
- jwt_public_key
- jwt_private_key
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
secrets:
- api_db_password
- api_mailer_password
- sentry_dsn
- jwt_encryption_key
- jwt_public_key
- jwt_private_key
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
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
networks:
traefik-public:
name: traefik-public