-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
73 lines (66 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
version: '3.7'
volumes:
postgres_data:
rabbitmq_data:
services:
backend:
build: ./backend
container_name: backend
restart: on-failure
ports:
- 8000:8000
environment:
- PORT=8000
- KRATOS_URL=http://kratos:4433
depends_on:
- kratos
postgres:
image: postgres:15
container_name: database
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
- POSTGRES_MULTIPLE_DATABASES=application,kratos
ports:
- 5432:5432
volumes:
- ./config/database/:/docker-entrypoint-initdb.d/
- postgres_data:/var/lib/postgresql/data/
healthcheck:
test: ["CMD-SHELL", "pg_isready -U user"]
interval: 5s
timeout: 5s
retries: 5
kratos-migrate:
image: oryd/kratos:v1.0.0
container_name: kratos_db_migrate
environment:
- DSN=postgres://user:password@postgres:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4
volumes:
- ./config/kratos:/etc/config/kratos
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
kratos:
image: oryd/kratos:v1.0.0
container_name: kratos
env_file:
- .env
ports:
- 4433:4433
- 4434:4434
volumes:
- ./config/kratos:/etc/config/kratos
command: serve -c /etc/config/kratos/kratos.yml --dev --watch-courier
oathkeeper:
image: oryd/oathkeeper:v0.40
container_name: api_gateway
depends_on:
- kratos
ports:
- 8080:4455
- 4456:4456
command: serve proxy -c "/etc/config/oathkeeper/oathkeeper.yml"
environment:
- LOG_LEVEL=debug
restart: on-failure
volumes:
- ./config/oathkeeper:/etc/config/oathkeeper