-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
79 lines (72 loc) · 2.09 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
version: "3.9"
services:
mysql:
image: mysql:8
container_name: mysql
environment:
MYSQL_DATABASE: 'db'
MYSQL_USER: 'user'
MYSQL_PASSWORD: 'userpassword'
MYSQL_ROOT_PASSWORD: 'rootpassword'
ports:
- 3306:3306
expose:
- 3306
volumes:
- mysql-data:/var/lib/mysql
postgres:
image: postgres:13.2
container_name: postgres
restart: always
environment:
POSTGRES_DB: 'hydra'
POSTGRES_USER: 'hydra'
POSTGRES_PASSWORD: 'secret'
ports:
- 5432:5432
volumes:
- postgresql-data:/var/lib/postgresql/data:delegated
hydra-migrate:
image: oryd/hydra:v1.10.2
container_name: hydra-migrate
environment:
- DSN=postgres://hydra:secret@postgres:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
command: migrate sql -e --yes
restart: on-failure
depends_on:
- postgres
hydra:
image: oryd/hydra:v1.10.2
container_name: hydra
ports:
- 4444:4444 # Public port
- 4445:4445 # Admin port
command: serve all --dangerous-force-http
depends_on:
- hydra-migrate
environment:
- URLS_SELF_ISSUER=http://127.0.0.1:4444/
- URLS_SELF_PUBLIC=http://hydra:4444/
- URLS_CONSENT=http://127.0.0.1:9020/consent
- URLS_LOGIN=http://127.0.0.1:9020/login
- URLS_LOGOUT=http://127.0.0.1:9020/logout
- DSN=postgres://hydra:secret@postgres:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
- SECRETS_SYSTEM=${OAUTH_SECRET}
- TTL_ACCESS_TOKEN=1h # 1 hour before expiration
- TTL_REFRESH_TOKEN=720h # 30 days before expiration
- OIDC_SUBJECT_IDENTIFIERS_SUPPORTED_TYPES=public,pairwise
- OIDC_SUBJECT_IDENTIFIERS_PAIRWISE_SALT=youReallyNeedToChangeThis
- SERVE_COOKIES_SAME_SITE_MODE=Lax
- LOG_LEAK_SENSITIVE_VALUES=true
- LOG_LEVEL=debug
restart: unless-stopped
frontend:
image: oryd/hydra-login-consent-node:v1.3.2
container_name: frontend
environment:
HYDRA_ADMIN_URL: http://hydra:4445
ports:
- 9020:3000
volumes:
mysql-data:
postgresql-data: