-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
190 lines (178 loc) · 4.15 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
networks:
ory:
driver: bridge
volumes:
caddy_config:
caddy_data:
external: false
app_postgres_volume:
kratos_postgres_volume:
keto_postgres_volume:
services:
caddy:
image: ghcr.io/getlarge/cat-fostering/caddy:latest
ports:
- '8080:80'
- '4443:443'
volumes:
- caddy_data:/data
- caddy_config:/config
environment:
- BACKEND_DOMAIN=backend
deploy:
mode: replicated
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
profiles:
- dev
postgres:
image: postgres:16
volumes:
- app_postgres_volume:/var/lib/postgresql/data
ports:
- '5432:5432'
environment:
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=${POSTGRES_DB:-appdb}
networks:
- ory
profiles:
- ci
- dev
api:
image: ghcr.io/getlarge/cat-fostering/cat-fostering-api:${DOCKER_API_TAG:-dev}
pull_policy: never
depends_on:
- postgres
- kratos
- keto
ports:
- '3000:3000'
environment:
- NODE_ENV=test
- ORY_ACTION_API_KEY=${ORY_ACTION_API_KEY:-unsecure_api_key}
- ORY_KETO_ADMIN_URL=http://keto:4467
- ORY_KETO_PUBLIC_URL=http://keto:4466
- ORY_KRATOS_ADMIN_URL=http://kratos:4434
- ORY_KRATOS_PUBLIC_URL=http://kratos:4433
- PORT=3000
- POSTGRES_URL=postgres://dbuser:secret@postgres:5432
- POSTGRES_DB=${POSTGRES_DB:-cat_fostering_api_e2e}
networks:
- ory
profiles:
- ci
kratos-migrate:
image: oryd/kratos:v1.2.0
volumes:
- ${PWD}/infra/ory-kratos:/etc/config/kratos:ro
command: -c /etc/config/kratos/kratos.yaml migrate sql -e --yes
restart: on-failure
networks:
- ory
profiles:
- ci
- dev
kratos:
depends_on:
- kratos-migrate
image: oryd/kratos:v1.2.0
ports:
- '4433:4433' # public
- '4434:4434' # admin
restart: unless-stopped
command: serve -c /etc/config/kratos/kratos.yaml --dev --watch-courier
volumes:
- ${PWD}/infra/ory-kratos:/etc/config/kratos:ro
networks:
- ory
extra_hosts:
- 'host.docker.internal:host-gateway'
profiles:
- ci
- dev
kratos-postgres:
image: postgres:16
environment:
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=kratosdb
volumes:
- kratos_postgres_volume:/var/lib/postgresql/data
networks:
- ory
profiles:
- ci
- dev
kratos-selfservice-ui-node:
image: oryd/kratos-selfservice-ui-node:v1.2.0
environment:
- KRATOS_PUBLIC_URL=http://kratos:4433
- KRATOS_BROWSER_URL=${KRATOS_BROWSER_URL:-http://127.0.0.1:4433}
- COOKIE_SECRET=${COOKIE_SECRET:-cookie_secret_not_good_not_secure}
- CSRF_COOKIE_NAME=${CSRF_COOKIE_NAME:-csrf_token_local}
- CSRF_COOKIE_SECRET=${CSRF_COOKIE_SECRET:-csrf_cookie_secret_not_good_not_secure}
- PORT=4455
ports:
- '4455:4455'
networks:
- ory
restart: on-failure
profiles:
- dev
mailslurper:
image: oryd/mailslurper:latest-smtps
ports:
- '1025:1025'
- '4436:4436'
- '4437:4437'
networks:
- ory
profiles:
- ci
- dev
keto-migrate:
image: oryd/keto:v0.12.0
volumes:
- ${PWD}/infra/ory-keto:/etc/config/keto:ro
command: ['migrate', 'up', '-y', '-c', '/etc/config/keto/keto.yaml']
restart: on-failure
networks:
- ory
profiles:
- ci
- dev
keto:
depends_on:
- keto-migrate
image: oryd/keto:v0.12.0
ports:
- '4466:4466' # public
- '4467:4467' # admin
command: serve -c /etc/config/keto/keto.yaml
restart: on-failure
volumes:
- ${PWD}/infra/ory-keto:/etc/config/keto:ro
networks:
- ory
profiles:
- ci
- dev
keto-postgres:
image: postgres:16
environment:
- POSTGRES_USER=dbuser
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=accesscontroldb
volumes:
- keto_postgres_volume:/var/lib/postgresql/data
networks:
- ory
profiles:
- ci
- dev