-
Notifications
You must be signed in to change notification settings - Fork 7
/
hydrastart-postgres.yaml
42 lines (42 loc) · 1.53 KB
/
hydrastart-postgres.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
###########################################################################
####### 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: '3'
networks:
hydraguide:
external: true
services:
hydra-migrate:
image: oryd/hydra:v1.7.4
environment:
- DSN=postgres://hydra:secret@postgresd:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
command:
migrate sql -e --yes
restart: on-failure
networks:
- hydraguide
hydra:
depends_on:
- hydra-migrate
environment:
- DSN=postgres://hydra:secret@postgresd:5432/hydra?sslmode=disable&max_conns=20&max_idle_conns=4
networks:
- hydraguide
postgresd:
image: postgres:9.6
ports:
- "5432:5432"
environment:
- POSTGRES_USER=hydra
- POSTGRES_PASSWORD=secret
- POSTGRES_DB=hydra
networks:
- hydraguide