-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yaml
86 lines (78 loc) · 1.91 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
version: "3.8"
services:
postgresdb:
image: postgres:15.2-alpine
container_name: golang-api-postgresdb
environment:
POSTGRES_USER: golang-api
POSTGRES_PASSWORD: golang-api
POSTGRES_DB: golang-api
POSTGRES_MULTIPLE_DATABASES: '"kratos-db"'
ports:
- 5432:5432
volumes:
- ./pkg/kratos/kratos-pg-init-script:/docker-entrypoint-initdb.d
- pgdata:/var/lib/postgresql/data
adminer:
image: adminer
restart: always
ports:
- 8080:8080
environment:
- ADMINER_DEFAULT_SERVER=postgresdb
depends_on:
- postgresdb
kratos_migrate:
image: oryd/kratos:v1.0.0
profiles: [kratos]
environment:
- DSN=postgres://golang-api:golang-api@postgresdb:5432/kratos-db?sslmode=disable
- LOG_LEVEL=trace
command: migrate sql -e --yes
restart: on-failure
depends_on:
- postgresdb
kratos:
image: oryd/kratos:v1.0.0
profiles: [kratos]
ports:
- '4433:${SERVE_PUBLIC_PORT:-4433}' # public
- '4434:${SERVE_ADMIN_PORT:-4434}' # admin
environment:
- LOG_LEVEL=trace
env_file:
- .env
command: serve -c /etc/config/kratos/kratos.yml
restart: always
depends_on:
- postgresdb
- kratos_migrate
volumes:
- "./pkg/kratos:/etc/config/kratos"
init:
image: flipt/flipt:latest
profiles: [flipt]
command: ["./flipt", "import", "flipt.yml"]
environment:
- FLIPT_LOG_LEVEL=debug
- FLIPT_META_TELEMETRY_ENABLED=false
volumes:
- "./helpers/flipt/flipt.yml:/flipt.yml"
- "flipt_data:/var/opt/flipt"
flipt:
image: flipt/flipt:latest
profiles: [flipt]
command: ["./flipt"]
depends_on:
- init
ports:
- "8081:8080"
- "9000:9000"
environment:
- FLIPT_LOG_LEVEL=debug
- FLIPT_META_TELEMETRY_ENABLED=false
volumes:
- "flipt_data:/var/opt/flipt"
volumes:
pgdata:
flipt_data: