This repository has been archived by the owner on Sep 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yaml
67 lines (66 loc) · 2.17 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
version: "3"
services:
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: unless-stopped
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
volumes:
- "./scripts/mysql/:/docker-entrypoint-initdb.d"
ports:
- 3306:3306
hydra-migrate:
image: oryd/hydra:v1.10.6-sqlite
restart: on-failure
environment:
- DSN=mysql://root@tcp(db:3306)/hydra_dev?interpolateParams=true&parseTime=true
depends_on:
db:
condition: service_started
volumes:
- ./hydra.yaml:/etc/config/hydra/hydra.yaml:ro
- ./scripts/hydra:/scripts/hydra:ro
entrypoint: ""
command: [ "sh", "-c", "/scripts/hydra/migrate.sh" ]
hydra-create-client-creds:
image: oryd/hydra:v1.10.6-sqlite
restart: on-failure
environment:
- DSN=mysql://root@tcp(db:3306)/hydra_dev?interpolateParams=true&parseTime=true
depends_on:
hydra:
condition: service_started
volumes:
- ./hydra.yaml:/etc/config/hydra/hydra.yaml:ro
- ./scripts/hydra:/scripts/hydra:ro
entrypoint: ""
command: [ "sh", "-c", "/scripts/hydra/create-client-creds.sh" ]
hydra:
image: oryd/hydra:v1.10.6-sqlite
restart: unless-stopped
ports:
- "4444:4444" # Public port
- "4445:4445" # Admin port
depends_on:
hydra-migrate:
condition: service_completed_successfully
environment:
- DSN=mysql://root@tcp(db:3306)/hydra_dev?interpolateParams=true&parseTime=true
- SERVE_PUBLIC_CORS_ENABLED=true
- SERVE_PUBLIC_CORS_ALLOWED_ORIGINS=*
- CORS_ALLOWED_ORIGINS=*
- SERVE_PUBLIC_CORS_ALLOWED_METHODS=POST,GET,PUT,DELETE
volumes:
- ./hydra.yaml:/etc/config/hydra/hydra.yaml:ro
command: serve -c /etc/config/hydra/hydra.yaml all --dangerous-force-http
hydra-client:
image: oryd/hydra:v1.10.6-sqlite
restart: unless-stopped
ports:
- "5555:5555" # Port for hydra token user
depends_on:
- hydra
command: token user --client-id auth-code-client --no-shutdown
--token-url=http://hydra:4444/oauth2/token --client-secret secret
--endpoint http://localhost:4444/ --port 5555 --scope openid,offline