forked from atreya2011/go-kratos-test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
75 lines (68 loc) · 1.67 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
version: '3.7'
networks:
intranet:
driver: bridge
services:
kratos-migrate:
depends_on:
- auth-db
container_name: kratos-migrate
image: oryd/kratos:v0.10.1
# 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
kratos:
container_name: kratos
depends_on:
- kratos-migrate
image: oryd/kratos:v0.10.1
# 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