-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (73 loc) · 2.19 KB
/
docker-compose.yml
File metadata and controls
74 lines (73 loc) · 2.19 KB
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
version: '3.6'
services:
postgres:
image: postgres:12
restart: always
volumes:
- db_data:/var/lib/postgresql/data
networks:
- youtube-notes
graphql-engine:
image: hasura/graphql-engine:v1.3.0
depends_on:
- "postgres"
restart: always
networks:
- youtube-notes
environment:
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ADMIN_SECRET: "adminsecret"
HASURA_GRAPHQL_ENABLE_TELEMETRY: "false"
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: public
# This is basically the same as hasura but it auto saves the metadata on every change
graphql-console:
depends_on:
- "graphql-engine"
restart: unless-stopped # likely need restart for graphql-engine to be ready
build: ./hasura
command:
- ./docker-compose-up.sh
networks:
- youtube-notes
ports:
# NOTE
# interact with hasura only through this port, i.e. http://localhost:9695/
- "9695:9695"
- "9693:9693"
volumes:
- ./hasura:/hasura
working_dir: /hasura
environment:
# Precedence order is flag > ENV vars > .env file values > configuration file values > default.
# -- https://hasura.io/docs/1.0/graphql/manual/hasura-cli/config-reference.html
HASURA_GRAPHQL_ADMIN_SECRET: "adminsecret"
HASURA_GRAPHQL_ENABLE_TELEMETRY: "false"
#
# - `hasura console` server interacts with this endpoint directly
# - our browser will also interact with this endpoint directly (via hasura console webui)
#
# so unfortunately, this means `hasura-server` hostname must be reachable from
# inside this docker container AND our host machine.
#
# NOTE
# i.e. add `127.0.0.1 hasura-server` to your `/etc/hosts` file
HASURA_GRAPHQL_ENDPOINT: "http://graphql-engine:${HASURA_PORT:-8080}"
elm:
build:
context: .
dockerfile: Dockerfile
working_dir: /app
command: ["make", "elm"]
links:
- graphql-engine
depends_on:
- graphql-engine
networks:
- youtube-notes
environment:
HASURA_ADMIN_SECRET: "adminsecret"
HASURA_GRAPHQL_ENDPOINT: "http://graphql-engine:8080/v1/graphql"
volumes:
db_data:
networks:
youtube-notes: