-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
91 lines (90 loc) · 2.25 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
version: '3'
services:
database:
image: 'postgres:latest'
container_name: vote_db
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
volumes:
- type: volume
source: db-data
target: /var/lib/postgresql/data/
read_only: false
ports:
- 15432:5432
keycloak:
image: 'quay.io/keycloak/keycloak:24.0.0'
container_name: keycloak
depends_on:
- database
restart: always
environment:
- KEYCLOAK_ADMIN=${KEYCLOAK_ADMIN}
- KEYCLOAK_ADMIN_PASSWORD=${KEYCLOAK_ADMIN_PASSWORD}
- DB_VENDOR=postgres
- DB_ADDR=postgres
- DB_DATABASE=${KEYCLOAK_POSTGRESQL_DB}
- DB_USER=${KEYCLOAK_POSTGRESQL_USER}
- DB_PASSWORD=${KEYCLOAK_POSTGRESQL_PASS}
command:
- start-dev
- --import-realm
volumes:
- ./compose/realm.json:/opt/keycloak/data/import/realm.json
ports:
- 4446:8080
hydra:
image: oryd/hydra:v2.2.0
container_name: hydra
ports:
- "4444:4444" # Public port
- "4445:4445" # Admin port
- "5555:5555" # Port for hydra token user
command: serve -c /etc/config/hydra/hydra.yml all --dev
volumes:
- type: volume
source: hydra-sqlite
target: /var/lib/sqlite
read_only: false
- type: bind
source: ./compose
target: /etc/config/hydra
environment:
- DSN=sqlite:///var/lib/sqlite/db.sqlite?_fk=true
restart: unless-stopped
depends_on:
- hydra-migrate
networks:
- intranet
hydra-migrate:
image: oryd/hydra:v2.2.0
environment:
- DSN=sqlite:///var/lib/sqlite/db.sqlite?_fk=true
command: migrate -c /etc/config/hydra/hydra.yml sql -e --yes
volumes:
- type: volume
source: hydra-sqlite
target: /var/lib/sqlite
read_only: false
- type: bind
source: ./compose
target: /etc/config/hydra
restart: on-failure
networks:
- intranet
consent:
environment:
- HYDRA_ADMIN_URL=http://hydra:4445
image: oryd/hydra-login-consent-node:v2.2.0
ports:
- "3000:3000"
restart: unless-stopped
networks:
- intranet
networks:
intranet:
volumes:
hydra-sqlite:
db-data: