-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathquickstart-auth.yml
93 lines (88 loc) · 2.67 KB
/
quickstart-auth.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
92
93
version: "3.9"
services:
metadataservice:
environment:
- METADATASERVICE_OIDC_ENABLED=true
- METADATASERVICE_OIDC_AUDIENCE=http://127.0.0.1:8000
- METADATASERVICE_OIDC_ISSUER=http://hydra:4444/
- METADATASERVICE_OIDC_JWKSURI=http://hydra:4444/.well-known/jwks.json
- METADATASERVICE_OIDC_CLAIMS_ROLES=scp
depends_on:
hydra:
condition: service_started
postgres:
image: postgres:9.6
ports:
- "5432:5432"
environment:
- POSTGRES_USER=hydra
- POSTGRES_PASSWORD=secret
- POSGTRES_DB=hydra
healthcheck:
test: "pg_isready -U hydra"
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- metadataservice
hydra:
environment:
- SERVE_COOKIES_SAME_SITE_MODE=Lax
- URLS_SELF_ISSUER=http://hydra:4444
- URLS_CONSENT=http://hydra:3000/consent
- URLS_LOGIN=http://hydra:3000/login
- URL_LOGOUT=http://hydra:3000/logout
- SECRETS_SYSTEM=youReallyNeedToChangeThis
- OIDC_SUBJECT_IDENTIFIERS_PAIRWISE_SALT=youReallyNeedToChangeThis
- STRATEGIES_ACCESS_TOKEN=jwt
- OIDC_SUBJECT_IDENTIFIERS_SUPPORTED_TYPES=public
- DSN=postgres://hydra:secret@postgres:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
image: oryd/hydra:v1.10.6-sqlite
ports:
- "4444:4444" # Public port
- "4445:4445" # Admin port
- "5555:5555" # Port for hydra token user
command:
serve all --dangerous-force-http
volumes:
-
type: volume
source: hydra-sqlite
target: /var/lib/sqlite
read_only: false
restart: unless-stopped
depends_on:
hydra-migrate:
condition: service_completed_successfully
networks:
- metadataservice
hydra-migrate:
depends_on:
postgres:
condition: service_healthy
image: oryd/hydra:v1.10.6-sqlite
environment:
- DSN=postgres://hydra:secret@postgres:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
- SERVE_COOKIES_SAME_SITE_MODE=Lax
- URLS_SELF_ISSUER=http://hydra:4444
- URLS_CONSENT=http://hydra:3000/consent
- URLS_LOGIN=http://hydra:3000/login
- URL_LOGOUT=http://hydra:3000/logout
- SECRETS_SYSTEM=youReallyNeedToChangeThis
- OIDC_SUBJECT_IDENTIFIERS_PAIRWISE_SALT=youReallyNeedToChangeThis
- STRATEGIES_ACCESS_TOKEN=jwt
- OIDC_SUBJECT_IDENTIFIERS_SUPPORTED_TYPES=public
command:
migrate sql -e --yes
volumes:
-
type: volume
source: hydra-sqlite
target: /var/lib/sqlite
read_only: false
restart: on-failure
networks:
- metadataservice
volumes:
hydra-sqlite: