2018-09-13 12:33:13 +03:00
|
|
|
version: '3.6'
|
|
|
|
services:
|
|
|
|
postgres:
|
2020-02-19 16:52:40 +03:00
|
|
|
image: postgres:12
|
2018-09-13 12:33:13 +03:00
|
|
|
restart: always
|
|
|
|
volumes:
|
|
|
|
- db_data:/var/lib/postgresql/data
|
2020-02-19 16:52:40 +03:00
|
|
|
environment:
|
|
|
|
POSTGRES_PASSWORD: postgrespassword
|
2018-09-13 12:33:13 +03:00
|
|
|
graphql-engine:
|
2021-03-18 09:29:23 +03:00
|
|
|
image: hasura/graphql-engine:v2.0.0-alpha.5
|
2018-09-13 12:33:13 +03:00
|
|
|
depends_on:
|
|
|
|
- "postgres"
|
|
|
|
restart: always
|
|
|
|
environment:
|
2018-10-17 08:26:14 +03:00
|
|
|
# database url to connect
|
2020-02-19 16:52:40 +03:00
|
|
|
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
|
2020-06-03 12:55:47 +03:00
|
|
|
## enable the console served by server
|
2018-10-17 08:26:14 +03:00
|
|
|
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set "false" to disable console
|
2020-06-03 12:55:47 +03:00
|
|
|
## enable debugging mode. It is recommended to disable this in production
|
|
|
|
HASURA_GRAPHQL_DEV_MODE: "true"
|
|
|
|
## uncomment next line to set an admin secret
|
2019-02-14 12:37:47 +03:00
|
|
|
# HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
|
2018-09-13 12:33:13 +03:00
|
|
|
command:
|
2020-06-16 08:09:46 +03:00
|
|
|
- graphql-engine
|
2018-09-13 12:33:13 +03:00
|
|
|
- serve
|
|
|
|
caddy:
|
2020-06-16 08:09:46 +03:00
|
|
|
image: caddy/caddy
|
2018-09-13 12:33:13 +03:00
|
|
|
depends_on:
|
|
|
|
- "graphql-engine"
|
|
|
|
restart: always
|
|
|
|
ports:
|
|
|
|
- "80:80"
|
|
|
|
- "443:443"
|
|
|
|
volumes:
|
2020-06-16 08:09:46 +03:00
|
|
|
- ./Caddyfile:/etc/caddy/Caddyfile
|
2018-09-13 12:33:13 +03:00
|
|
|
- caddy_certs:/root/.caddy
|
|
|
|
volumes:
|
|
|
|
db_data:
|
|
|
|
caddy_certs:
|