-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (57 loc) · 1.67 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
version: '3'
services:
hasura:
image: hasura/graphql-engine:v2.32.0
container_name: mongo_hasura
restart: always
ports:
- 8080:8080
volumes:
- ./hasura:/hasura
environment:
HASURA_GRAPHQL_EE_LICENSE_KEY: [ENTER KEY]
HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_LOG_LEVEL: debug
HASURA_GRAPHQL_METADATA_DEFAULTS: '{"backend_configs":{"dataconnector":{"Mongo":{"uri":"http://mongo-data-connector:3000"}}}}'
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:15
container_name: mongo_pg
ports:
- 5432:5432
restart: always
environment:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgrespassword
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 10s
timeout: 5s
retries: 25
mongo-data-connector:
image: hasura/mongo-data-connector:v2.32.0
container_name: mongo_connector
ports:
- 3000:3000
mongodb:
image: mongo:6
container_name: mongodb_mongo
ports:
- 27017:27017
volumes:
- ./chinook/chinook-import.sh:/docker-entrypoint-initdb.d/chinook-import.sh
- ./chinook:/chinook
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
interval: 5s
timeout: 10s
retries: 5
start_period: 10s