forked from RodolfoSilva/hasura-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
38 lines (38 loc) · 1.31 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
version: '3.6'
services:
postgres:
image: postgres:10.5
restart: always
volumes:
- db_data:/var/lib/postgresql/data
graphql-engine:
image: hasura/graphql-engine:v1.0.0-beta.6
ports:
- "8080:8080"
depends_on:
- postgres
- hasura-auth
restart: always
command: sh -c '/wait-for hasura-auth:4000 -- graphql-engine serve'
volumes:
- ./wait-for:/wait-for
environment:
# database url to connect
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:@postgres:5432/postgres
# enable the console served by server
HASURA_GRAPHQL_ENABLE_CONSOLE: 'true' # set "false" to disable console
HASURA_GRAPHQL_AUTH_HOOK: http://hasura-auth:4000/hook
## uncomment next line to set an admin secret key
HASURA_GRAPHQL_ADMIN_SECRET: secretmasterkey
hasura-auth:
build: .
restart: always
environment:
HASURA_GRAPHQL_ENDPOINT: http://graphql-engine:8080/v1/graphql
HASURA_GRAPHQL_ADMIN_SECRET: secretmasterkey # change this with your strong password
JWT_ALGORITHM: HS256
# change the jwt private key
JWT_PRIVATE_KEY: cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
JWT_REFRESH_TOKEN_EXPIRES: 1440 # 1440m = 24h
volumes:
db_data: