-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
executable file
·200 lines (187 loc) · 5.67 KB
/
docker-compose.yaml
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
version: '3.8'
services:
yarn:
image: node:16
working_dir: /workspace
volumes:
- ./:/workspace
entrypoint: yarn
traefik:
image: traefik:v2.6
command:
- --entrypoints.web.address=:80
- --entrypoints.web-secure.address=:443
- --providers.docker=true
- --providers.file.directory=/configuration/
- --providers.file.watch=true
ports:
- '80:80'
- '443:443'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
- '.config/traefik/:/configuration/'
- '.config/certs:/certs/'
db:
image: bitnami/postgresql
environment:
- POSTGRESQL_PASSWORD=password
- POSTGRESQL_DATABASE=db
ports:
- 5432:5432
mailslurper:
image: oryd/mailslurper:latest-smtps
ports:
- '4436:4436'
- '4437:4437'
kratos-migrate:
depends_on:
- db
image: oryd/kratos:v0.8.2-alpha.1
environment:
- DSN=postgres://postgres:password@db:5432/db?sslmode=disable&max_conns=20&max_idle_conns=4
volumes:
- type: bind
source: ./config/ory/kratos
target: /config/kratos
command: -c /config/kratos/kratos.yml migrate sql -e --yes
restart: on-failure
kratos:
depends_on:
- kratos-migrate
- mailslurper
- db
image: oryd/kratos:v0.8.2-alpha.1
ports:
- '4433:4433'
- '4434:4434'
restart: unless-stopped
environment:
- DSN=postgres://postgres:password@db:5432/db?sslmode=disable&max_conns=20&max_idle_conns=4
- LOG_LEVEL=trace
command: serve -c /config/kratos/kratos.yml --dev --watch-courier
volumes:
- type: bind
source: ./config/ory/kratos
target: /config/kratos
labels:
- 'traefik.http.services.identity.loadbalancer.server.port=4433'
- 'traefik.http.routers.identity.rule=Host(`identity.torin-asakura.support`)'
- 'traefik.http.routers.identity.tls=true'
oathkeeper-migrate:
image: oryd/oathkeeper:v0.38.25
environment:
- DSN=postgres://postgres:password@db:5432/db?sslmode=disable&max_conns=20&max_idle_conns=4
command: migrate sql -e --yes
restart: on-failure
oathkeeper:
image: oryd/oathkeeper:v0.38.25
command: serve serve --config /etc/config/oathkeeper/config.yaml
volumes:
- type: bind
source: .config/oathkeeper
target: /etc/config/oathkeeper
environment:
- DATABASE_URL=postgres://postgres:password@db:5432/db?sslmode=disable&max_conns=20&max_idle_conns=4
restart: unless-stopped
depends_on:
- oathkeeper-migrate
- db
labels:
- 'traefik.http.middlewares.oathkeeper.forwardauth.address=http://oathkeeper:4456/decisions'
- 'traefik.http.middlewares.oathkeeper.forwardauth.authResponseHeaders=X-User,Authorization'
- 'traefik.http.middlewares.oathkeeper.forwardauth.trustForwardHeader=true'
- 'traefik.http.services.oathkeeper.loadbalancer.server.port=4456'
identity:
image: node:16
working_dir: /workspace
volumes:
- ./:/workspace
entrypoint: yarn workspace @identity/accounts-app-entrypoint dev
environment:
- KRATOS_PUBLIC_URL=https://identity.torin-asakura.support/
- KRATOS_BROWSER_URL=https://identity.torin-asakura.support/
- KRATOS_ADMIN_URL=https://identity.torin-asakura.support/
- BASE_URL=https://accounts.torin-asakura.support/
- PRIVATE_GATEWAY_URL=https://private-gateway.torin-asakura.support/
- PUBLIC_GATEWAY_URL=https://public-gateway.torin-asakura.support/
depends_on:
- kratos
- private-gateway
- public-gateway
- traefik
networks:
- default
ports:
- 3000:3000
labels:
- 'traefik.http.services.accounts.loadbalancer.server.port=3000'
- 'traefik.http.routers.accounts.rule=Host(`accounts.torin-asakura.support`)'
- 'traefik.http.routers.accounts.tls=true'
verification:
image: node:16
working_dir: /workspace
volumes:
- ./:/workspace
entrypoint: yarn workspace @verification/service-entrypoint dev
networks:
- default
environment:
- DB_HOST=db
- SUMSUB_APP_TOKEN=sbx:NzowShNiQ5DZWdY0oS1hN8F3.c2bF9HxN5TJzVI8yyf7q2F0YsUBEeFnV
- SUMSUB_SECRET_KEY=HATEOOllPBMAxjqG2CCJL5uy2eFFlbVj
depends_on:
- db
files:
image: node:16
working_dir: /workspace
volumes:
- ./:/workspace
entrypoint: yarn workspace @files/service-entrypoint dev
networks:
- default
environment:
- DB_HOST=db
env_file:
- .env
depends_on:
- db
ports:
- 50051:50051
private-gateway:
image: node:16
working_dir: /workspace
volumes:
- ./:/workspace
entrypoint: yarn workspace @gateway/private-gateway-entrypoint dev
environment:
- VERIFICATION_SERVICE_URL=verification:50051
networks:
- default
ports:
- 3001:3000
depends_on:
- verification
- traefik
labels:
- 'traefik.http.services.private-gateway.loadbalancer.server.port=3000'
- 'traefik.http.routers.private-gateway.rule=Host(`private-gateway.torin-asakura.support`)'
- 'traefik.http.routers.private-gateway.tls=true'
public-gateway:
image: node:16
working_dir: /workspace
volumes:
- ./:/workspace
entrypoint: yarn workspace @gateway/public-gateway-entrypoint dev
networks:
- default
environment:
- FILES_SERVICE_URL=files:50051
depends_on:
- files
- traefik
ports:
- 3002:3000
labels:
- 'traefik.http.services.public-gateway.loadbalancer.server.port=3000'
- 'traefik.http.routers.public-gateway.rule=Host(`public-gateway.torin-asakura.support`)'
- 'traefik.http.routers.public-gateway.tls=true'