-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathdocker-compose.yml
69 lines (65 loc) · 1.71 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
version: '3.6'
services:
postgres:
image: postgres:13.5
ports:
- "5432:5432"
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
restart: always
volumes:
- db_data:/var/lib/postgresql/data
migration:
depends_on:
- postgres
- graphql-engine
build:
context: server
dockerfile: Dockerfile-migration
environment:
- HASURA_ENDPOINT=http://graphql-engine:8080
- DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- HASURA_ACCESS_KEY=${HASURA_ACCESS_KEY}
command:
[
"sh",
"./wait-for-pg.sh",
"postgres",
"npm run migrate"
]
graphql-engine:
image: hasura/graphql-engine:v1.0.0-beta.3
depends_on:
- postgres
restart: always
environment:
- HASURA_GRAPHQL_DATABASE_URL=postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
- HASURA_GRAPHQL_ACCESS_KEY=${HASURA_ACCESS_KEY}
- HASURA_GRAPHQL_AUTH_HOOK=http://auth:3001/api/auth/webhook
command: >
/bin/sh -c "graphql-engine serve --enable-console;"
auth:
build:
context: server/auth
args:
- NODE_ENV=development
environment:
- NODE_ENV=development
- JWT_TOKEN=${JWT_TOKEN}
- HASURA_ENDPOINT=http://graphql-engine:8080/v1alpha1/graphql
- AUTH_GITHUB_CLIENT_ID=${AUTH_GITHUB_CLIENT_ID}
- AUTH_GITHUB_CLIENT_SECRET=${AUTH_GITHUB_CLIENT_SECRET}
- AUTH_URL=${AUTH_URL}
- FRONTEND_URL=${FRONTEND_URL}
depends_on:
- graphql-engine
nginx:
build:
context: client
depends_on:
- auth
- graphql-engine
volumes:
db_data:
notused: