forked from ory/hydra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
112 lines (103 loc) · 3.61 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
###########################################################################
####### FOR DEMONSTRATION PURPOSES ONLY #######
###########################################################################
# #
# If you have not yet read the tutorial, do so now: #
# https://www.ory.sh/docs/hydra/5min-tutorial #
# #
# This set up is only for demonstration purposes. The login #
# endpoint can only be used if you follow the steps in the tutorial. #
# #
###########################################################################
version: '2'
services:
hydra-migrate:
build:
context: .
dockerfile: Dockerfile
links:
- postgresd:postgresd
# Uncomment the following section to use mysql instead.
# - mysqld:mysqld
environment:
# - LOG_LEVEL=debug
- DATABASE_URL=postgres://hydra:secret@postgresd:5432/hydra?sslmode=disable
# Uncomment the following section to use mysql instead.
# - DATABASE_URL=mysql://root:secret@tcp(mysqld:3306)/mysql?parseTime=true
command:
migrate sql -e
restart: on-failure
hydra:
build:
context: .
dockerfile: Dockerfile
links:
- postgresd:postgresd
# Uncomment the following line to use mysql instead.
# - mysqld:mysqld
depends_on:
- hydra-migrate
# Uncomment the following when configuring tracing
# - jaeger
ports:
# Public port
- "4444:4444"
# Admin port
- "4445:4445"
# Port for hydra token user
- "5555:5555"
command:
serve all --dangerous-force-http
environment:
# - LOG_LEVEL=debug
- OAUTH2_ISSUER_URL=http://localhost:4444
- OAUTH2_CONSENT_URL=http://localhost:3000/consent
- OAUTH2_LOGIN_URL=http://localhost:3000/login
- DATABASE_URL=postgres://hydra:secret@postgresd:5432/hydra?sslmode=disable
# Uncomment the following line to use mysql instead.
# - DATABASE_URL=mysql://root:secret@tcp(mysqld:3306)/mysql?parseTime=true
- SYSTEM_SECRET=youReallyNeedToChangeThis
- OAUTH2_SHARE_ERROR_DEBUG=1
- OIDC_SUBJECT_TYPES_SUPPORTED=public,pairwise
- OIDC_SUBJECT_TYPE_PAIRWISE_SALT=youReallyNeedToChangeThis
# - OAUTH2_ACCESS_TOKEN_STRATEGY=jwt
# Uncomment the following lines when configuring tracing
# - TRACING_PROVIDER=jaeger
# - TRACING_PROVIDER_JAEGER_SAMPLING_SERVER_URL=http://jaeger:5778/sampling
# - TRACING_PROVIDER_JAEGER_LOCAL_AGENT_ADDRESS=jaeger:6831
# - TRACING_PROVIDER_JAEGER_SAMPLING_TYPE=const
# - TRACING_PROVIDER_JAEGER_SAMPLING_VALUE=1
restart: unless-stopped
consent:
environment:
- HYDRA_ADMIN_URL=http://hydra:4445
image: oryd/hydra-login-consent-node:v1.0.0-rc.5
links:
- hydra
ports:
- "3000:3000"
restart: unless-stopped
# Uncomment the following when configuring tracing
# jaeger:
# image: jaegertracing/all-in-one:1.7.0
# ports:
# - "5775:5775/udp"
# - "6831:6831/udp"
# - "6832:6832/udp"
# - "5778:5778"
# - "16686:16686"
# - "14268:14268"
# - "9411:9411"
postgresd:
image: postgres:9.6
ports:
- "5432:5432"
environment:
- POSTGRES_USER=hydra
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=hydra
# Uncomment the following section to use mysql instead.
# mysqld:
# image: mysql:5.7
# environment:
# - MYSQL_ROOT_PASSWORD=secret