-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
103 lines (95 loc) · 2.76 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
version: '3.8'
services:
yarn:
image: node:16.13
working_dir: /workspace
volumes:
- ./:/workspace
entrypoint: yarn
db:
image: bitnami/postgresql
environment:
- POSTGRESQL_PASSWORD=password
- POSTGRESQL_DATABASE=db
- POSTGRESQL_USER=postgres
ports:
- 5432:5432
kratos-proxy:
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:
- '4433:80'
volumes:
- '/var/run/docker.sock:/var/run/docker.sock:ro'
kratos-migrate:
depends_on:
- db
image: docker.io/oryd/kratos:v0.11.0
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.yaml migrate sql -e --yes
restart: on-failure
networks:
- default
kratos:
depends_on:
- kratos-migrate
- mailslurper
- db
- kratos-proxy
image: docker.io/oryd/kratos:v0.11.0
ports:
- '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.yaml --dev --watch-courier
networks:
- default
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(`localhost`)'
- 'traefik.http.routers.identity.middlewares=cors'
- 'traefik.http.middlewares.cors.headers.accesscontrolalloworiginlist=http://localhost:3000'
- 'traefik.http.middlewares.cors.headers.accesscontrolallowmethods=GET,POST,PUT,OPTIONS'
- 'traefik.http.middlewares.cors.headers.accesscontrolallowheaders=content-type,authorization,cookie'
- 'traefik.http.middlewares.cors.headers.accesscontrolallowcredentials=true'
mailslurper:
image: oryd/mailslurper:latest-smtps
ports:
- '4436:4436'
- '4437:4437'
oathkeeper:
image: oryd/oathkeeper:v0.40.1
command: serve --config /config/oathkeeper/oathkeeper.yml
volumes:
- type: bind
source: ./config/ory/oathkeeper
target: /config/oathkeeper
ports:
- 4455:4455
- 4456:4456
identity:
image: node:16.13
working_dir: /workspace
volumes:
- ./:/workspace
entrypoint: yarn workspace @identity/renderer-entrypoint dev
depends_on:
- kratos
ports:
- '3000:3000'