-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
149 lines (149 loc) · 4.25 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
149 lines (149 loc) · 4.25 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
services:
identity-platform-login-ui:
image: ghcr.io/canonical/identity-platform-login-ui:v0.24.1
environment:
- KRATOS_PUBLIC_URL=http://kratos:4433
- KRATOS_ADMIN_URL=http://kratos:4434
- HYDRA_ADMIN_URL=http://hydra:4445
- BASE_URL=http://localhost:4455
- COOKIES_ENCRYPTION_KEY=WrfOcYmVBwyduEbKYTUhO4X7XVaOQ1wF
- PORT=4455
- LOG_LEVEL=DEBUG
- TRACING_ENABLED=FALSE
- MFA_ENABLED=FALSE
- OPENFGA_API_SCHEME=http
- OPENFGA_API_HOST=openfga:8080
ports:
- "4455:4455"
networks:
- intranet
restart: on-failure
kratos-migrate:
image: ghcr.io/canonical/kratos:1.3.1
environment:
- DSN=postgres://kratos:kratos@postgres:5432/kratos?sslmode=disable
volumes:
- type: bind
source: ./docker/kratos
target: /etc/config/kratos
command: exec kratos -c /etc/config/kratos/kratos.yml migrate sql -e --yes
restart: on-failure
networks:
- intranet
kratos:
depends_on:
- kratos-migrate
image: ghcr.io/canonical/kratos:1.3.1
ports:
- '4433:4433' # public
- '4434:4434' # admin
restart: unless-stopped
environment:
- DSN=postgres://kratos:kratos@postgres:5432/kratos?sslmode=disable
- LOG_LEVEL=trace
- SELFSERVICE_METHODS_OIDC_CONFIG_PROVIDERS_0_CLIENT_ID=${CLIENT_ID}
- SELFSERVICE_METHODS_OIDC_CONFIG_PROVIDERS_0_CLIENT_SECRET=${CLIENT_SECRET}
command: exec kratos serve -c /etc/config/kratos/kratos.yml --dev --watch-courier
volumes:
- type: bind
source: ./docker/kratos
target: /etc/config/kratos
networks:
- intranet
extra_hosts:
- "host.docker.internal:host-gateway"
kratos-setup:
image: ghcr.io/canonical/kratos:1.3.1
depends_on:
- kratos
restart: "no"
volumes:
- type: bind
source: ./docker/kratos
target: /etc/config/kratos
command: exec kratos import identities /etc/config/kratos/identity.json --endpoint http://kratos:4434
networks:
- intranet
hydra:
image: ghcr.io/canonical/hydra:2.3.0-canonical
ports:
- "4444:4444" # Public port
- "4445:4445" # Admin port
command: exec hydra serve -c /etc/config/hydra/hydra.yml all --dev
volumes:
- type: bind
source: ./docker/hydra
target: /etc/config/hydra
environment:
- DSN=postgres://hydra:hydra@postgres/hydra?sslmode=disable
- CORS_DEBUG=1
restart: unless-stopped
depends_on:
- hydra-migrate
networks:
- intranet
extra_hosts:
- "host.docker.internal:host-gateway"
hydra-migrate:
image: ghcr.io/canonical/hydra:2.3.0-canonical
environment:
- DSN=postgres://hydra:hydra@postgres/hydra?sslmode=disable
command: exec hydra migrate -c /etc/config/hydra/hydra.yml sql -e --yes
volumes:
- type: bind
source: ./docker/hydra
target: /etc/config/hydra
restart: on-failure
networks:
- intranet
mailslurper:
image: oryd/mailslurper:latest-smtps
ports:
- '4436:4436'
- '4437:4437'
networks:
- intranet
postgres:
image: postgres
restart: always
ports:
- 5432:5432
volumes:
- ./docker/postgres/init-database.sql:/docker-entrypoint-initdb.d/init-database.sql
environment:
POSTGRES_USER: hydra
POSTGRES_PASSWORD: hydra
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U hydra" ]
interval: 5s
timeout: 5s
retries: 5
networks:
- intranet
migrateopenfga:
image: openfga/openfga:v1.11.2
command: migrate --datastore-engine postgres --datastore-uri 'postgresql://openfga:openfga@postgres/openfga?sslmode=disable'
depends_on:
postgres:
condition: service_healthy
networks:
- intranet
openfga:
image: openfga/openfga:v1.11.2
environment:
OPENFGA_DATASTORE_ENGINE: "postgres"
OPENFGA_DATASTORE_URI: "postgresql://openfga:openfga@postgres/openfga?sslmode=disable"
OPENFGA_AUTHN_METHOD: "preshared"
OPENFGA_AUTHN_PRESHARED_KEYS: "42"
command: run
ports:
- 8080:8080
- 8081:8081
- 3000:3000
depends_on:
migrateopenfga:
condition: service_completed_successfully
networks:
- intranet
networks:
intranet: