-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
76 lines (76 loc) · 2.53 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
70
71
72
73
74
75
76
version: '3.8'
services:
postgres:
image: timescale/timescaledb-ha:pg14-latest
healthcheck:
test:
- CMD-SHELL
- pg_isready -U postgres -d postgres -q
interval: 3s
start_period: 2m0s
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: app
ports:
- '5432:5432'
volumes:
# used for initial setup
- './db/dumps/:/docker-entrypoint-initdb.d/'
restart: on-failure
networks:
- ts-graphql-starter
graphql-engine:
build: ./graphql-engine
volumes:
- './graphql-engine/metadata/:/hasura-metadata/'
# migrations are managed by api services
# - './graphql-engine/migrations/:/hasura-migrations/'
ports:
- '8082:8080'
restart: on-failure
depends_on:
postgres:
condition: service_healthy
networks:
- ts-graphql-starter
environment:
## postgres database to store Hasura metadata
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgres@postgres:5432/app
HASURA_GRAPHQL_JWT_SECRET: '{"type":"HS256","key":"c9c4ad92-dc28-4928-99f8-689c391bd277","claims_namespace_path":"$$.hg","allowed_skew": 30}'
## this env var can be used to add the above postgres database to Hasura as a data source. this can be removed/updated based on your needs
PG_DATABASE_URL: postgres://postgres:postgres@postgres:5432/app
HASURA_GRAPHQL_ADMIN_SECRET: admin12345
HASURA_GRAPHQL_ENABLE_TELEMETRY: false
## enable the console served by server
HASURA_GRAPHQL_ENABLE_CONSOLE: false # set to "false" to disable console
## enable debugging mode. It is recommended to disable this in production
HASURA_GRAPHQL_DEV_MODE: true
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log
HASURA_GRAPHQL_ENABLE_REMOTE_SCHEMA_PERMISSIONS: true
minio:
image: minio/minio:latest
ports:
- "9000:9000"
- "9001:9001"
environment:
- "MINIO_ACCESS_KEY=minio"
- "MINIO_SECRET_KEY=minio123"
command: server --console-address ":9001" /data
networks:
- ts-graphql-starter
createbuckets: # container used to apply some initial policies
image: minio/mc
networks:
- ts-graphql-starter
depends_on:
- minio
entrypoint: >
/bin/sh -c "
/usr/bin/mc alias set myminio http://minio:9000 minio minio123;
/usr/bin/mc mb --region=eu-west myminio/bucket;
/usr/bin/mc anonymous set download myminio/bucket;
exit 0;
"
networks:
ts-graphql-starter:
driver: bridge