-
Notifications
You must be signed in to change notification settings - Fork 27
/
docker-compose.yml
109 lines (100 loc) · 2.61 KB
/
docker-compose.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
version: '3.7'
networks:
intranet:
driver: bridge
services:
kratos-migrate:
depends_on:
- auth-db
container_name: kratos-migrate
image: oryd/kratos:v0.8.0-alpha.3
# to run db migrations we use the kratos-cli but don't need to mount the config directory
# as we only require the DSN to be set as the environment variable for running the migrations
environment:
- DSN=postgres://auth:secret@auth-db:5432/auth?sslmode=disable&max_conns=20&max_idle_conns=4
command: migrate sql -e --yes
networks:
- intranet
hydra-migrate:
depends_on:
- auth-db
- kratos-migrate
container_name: hydra-migrate
image: oryd/hydra:v1.10.6
environment:
- DSN=postgres://auth:secret@auth-db:5432/auth?sslmode=disable&max_conns=20&max_idle_conns=4
- SECRETS_SYSTEM=youReallyNeedToChangeThis
restart: on-failure
command: migrate sql -e --yes
networks:
- intranet
hydra:
container_name: hydra
image: oryd/hydra:v1.10.6
depends_on:
- auth-db
- hydra-migrate
ports:
- 4444:4444 # Public port
- 4445:4445 # Admin port
- 5555:5555 # Port for hydra token user
command:
serve -c /etc/hydra/config/hydra.yml all --dangerous-force-http
restart: on-failure # TODO figure out why we need this (incorporate health check into hydra migrate command?)
networks:
- intranet
volumes:
- type: bind
source: ./config
target: /etc/hydra/config
kratos:
container_name: kratos
depends_on:
- kratos-migrate
image: oryd/kratos:v0.8.0-alpha.3
# watch-courier is set for sending verification/recovery emails
command: serve -c /etc/kratos/config/kratos.yml --dev --watch-courier
volumes:
- type: bind
source: ./config
target: /etc/kratos/config
- type: bind
source: ./identity-schemas
target: /etc/kratos/identity-schemas
ports:
- 4433:4433 # public
- 4434:4434 # admin
networks:
- intranet
auth-db:
image: postgres:alpine
container_name: auth-db
ports:
- 5432:5432
environment:
- POSTGRES_USER=auth
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=auth
networks:
- intranet
mailslurper:
image: oryd/mailslurper:latest-smtps
ports:
- 4436:4436
- 4437:4437
networks:
- intranet
self-service-go:
build:
context: .
dockerfile: ./Dockerfile
container_name: self-service-go
depends_on:
- auth-db
- kratos
volumes:
- $PWD:/src
ports:
- 4455:4455
networks:
- intranet