-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
127 lines (119 loc) · 3.19 KB
/
docker-compose.yml
File metadata and controls
127 lines (119 loc) · 3.19 KB
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
services:
postgres:
image: postgres:16
container_name: code-type-postgres
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 10s
timeout: 5s
retries: 5
kratos-migrate:
image: oryd/kratos:v1.2.0
container_name: code-type-kratos-migrate
depends_on:
postgres:
condition: service_healthy
environment:
DSN: ${KRATOS_DSN}
LOG_LEVEL: ${KRATOS_LOG_LEVEL:-info}
command:
- migrate
- sql
- -e
- --config
- /etc/config/kratos.yml
- --yes
volumes:
- ./auth-service/kratos:/etc/config:ro
restart: "on-failure"
kratos:
image: oryd/kratos:v1.2.0
container_name: code-type-kratos
depends_on:
kratos-migrate:
condition: service_completed_successfully
environment:
DSN: ${KRATOS_DSN}
LOG_LEVEL: ${KRATOS_LOG_LEVEL:-info}
KRATOS_BROWSER_DEFAULT_RETURN_URL: ${KRATOS_BROWSER_DEFAULT_RETURN_URL:-http://frontend-service:3000/}
COOKIE_SECRET: ${KRATOS_COOKIE_SECRET}
DEFAULT_SECRET: ${KRATOS_DEFAULT_SECRET}
CIPHER_SECRET: ${KRATOS_CIPHER_SECRET}
command:
- serve
- --config
- /etc/config/kratos.yml
ports:
- "4433:4433"
- "4434:4434"
volumes:
- ./auth-service/kratos:/etc/config:ro
restart: unless-stopped
kratos-courier:
image: oryd/kratos:v1.2.0
container_name: code-type-kratos-courier
depends_on:
kratos:
condition: service_started
environment:
DSN: ${KRATOS_DSN}
LOG_LEVEL: ${KRATOS_LOG_LEVEL:-info}
command:
- courier
- watch
- --config
- /etc/config/kratos.yml
volumes:
- ./auth-service/kratos:/etc/config:ro
restart: unless-stopped
oathkeeper:
image: oryd/oathkeeper:v0.40.6
container_name: code-type-oathkeeper
depends_on:
kratos:
condition: service_started
environment:
LOG_LEVEL: ${OATHKEEPER_LOG_LEVEL:-debug}
command:
- serve
- proxy
- --config
- /etc/config/oathkeeper.yml
ports:
- "4455:4455"
- "4456:4456"
volumes:
- ./auth-service/oathkeeper/config.yml:/etc/config/oathkeeper.yml:ro
- ./auth-service/oathkeeper/rules.yml:/etc/oathkeeper/rules.yml:ro
restart: unless-stopped
backend:
build:
context: ./backend-service
container_name: code-type-backend
depends_on:
oathkeeper:
condition: service_started
environment:
GO_ENV: ${GO_ENV:-development}
HTTP_PORT: ${BACKEND_HTTP_PORT:-8080}
KRATOS_PUBLIC_URL: ${KRATOS_PUBLIC_URL:-http://oathkeeper:4455/.ory/kratos/public}
KRATOS_ADMIN_URL: ${KRATOS_ADMIN_URL:-http://kratos:4434}
DATABASE_DSN: ${BACKEND_DATABASE_DSN}
ports:
- "8080:8080"
restart: unless-stopped
mailhog:
image: mailhog/mailhog:v1.0.1
container_name: code-type-mailhog
ports:
- "1025:1025"
- "8025:8025"
restart: unless-stopped
volumes:
postgres-data: