forked from ory/hydra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
87 lines (80 loc) · 2.73 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
###########################################################################
####### FOR DEMONSTRATION PURPOSES ONLY #######
###########################################################################
# #
# If you have not yet read the tutorial, do so now: #
# https://ory-am.gitbooks.io/hydra/content/tutorial.html #
# #
# 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
environment:
# - LOG_LEVEL=debug
- DATABASE_URL=postgres://hydra:secret@postgresd:5432/hydra?sslmode=disable
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
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
restart: unless-stopped
consent:
environment:
- HYDRA_ADMIN_URL=http://hydra:4445
image: oryd/hydra-login-consent-node:v1.0.0-beta.9
links:
- hydra
ports:
- "3000:3000"
restart: unless-stopped
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