forked from rcos/Telescope
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
55 lines (49 loc) · 1.51 KB
/
docker-compose.dev.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
# Development docker-compose file. Will pull up local Postgres database
# and local PostgREST API for running telescope locally.
version: "3.1"
services:
db:
image: postgres:latest
environment:
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD}"
volumes:
- "/var/run/postgres/postgres.sock:/var/run/postgres/postgres.sock"
- "db_data:/var/lib/postgresql/data"
ports:
- "5432:5432"
# Hasura Postgres -> GraphQL engine
hasura:
image: hasura/graphql-engine:v2.2.0
restart: unless-stopped
depends_on:
- db
environment:
# https://hasura.io/docs/1.0/graphql/core/deployment/graphql-engine-flags/reference.html
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: "web_anon"
HASURA_GRAPHQL_DATABASE_URL: "${DATABASE_URL}"
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_JWT_SECRET: "{ \"type\": \"HS256\", \"key\": \"${RCOS_JWT_SECRET}\" }"
HASURA_GRAPHQL_LOG_LEVEL: "info"
HASURA_GRAPHQL_ADMIN_SECRET: "${HASURA_GRAPHQL_ADMIN_SECRET}"
ports:
- "8000:8080"
# Use caddy for reverse proxy and TLS/SSL certs.
caddy:
image: caddy:2
volumes:
- "caddy_data:/data"
- "${PWD}/Caddyfile.dev:/etc/caddy/Caddyfile"
ports:
- "8001:8001"
- "8443:443"
volumes:
db_data:
caddy_data:
# We need to ensure a stable gateway ip if we want the caddyfile to point to the host each time
networks:
default:
ipam:
config:
- subnet: 172.18.0.0/16
gateway: 172.18.0.1