generated from okp4/template-oss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
95 lines (89 loc) · 2.29 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: "3"
services:
postgres:
build:
context: docker
dockerfile_inline: |
FROM postgres:12-alpine
COPY initialize-db.sh /docker-entrypoint-initdb.d/
ports:
- ${DB_POSTGRES_PORT?}:5432
environment:
POSTGRES_USER: ${DB_POSTGRES_USER?}
POSTGRES_PASSWORD: ${DB_POSTGRES_PASSWORD?}
DB_SUBQL_NAME: ${DB_SUBQL_NAME?}
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_POSTGRES_USER?}"]
interval: 5s
timeout: 5s
retries: 5
subquery-node:
image: onfinality/subql-node-cosmos:v3.4.5
depends_on:
postgres:
condition: service_healthy
restart: always
environment:
DB_HOST: postgres
DB_PORT: ${DB_POSTGRES_PORT?}
DB_DATABASE: ${DB_SUBQL_NAME?}
DB_USER: ${DB_SUBQL_USER?}
DB_PASS: ${DB_SUBQL_PASSWORD?}
volumes:
- .:/app
command:
- ${SUB_COMMAND?}
- -f=/app
- --batch-size=${SUB_BATCH_SIZE?}
- --query-limit=${SUB_QUERY_LIMIT?}
- --debug=${SUB_DEBUG?}
- --log-level=${SUB_LOG_LEVEL?}
- --db-schema=app
healthcheck:
test: ["CMD", "curl", "-f", "http://subquery-node:3000/ready"]
interval: 3s
timeout: 5s
retries: 10
graphql-engine:
image: onfinality/subql-query:v2.8.0
ports:
- 3000:3000
depends_on:
postgres:
condition: service_healthy
subquery-node:
condition: service_healthy
restart: always
environment:
DB_HOST: postgres
DB_PORT: ${DB_POSTGRES_PORT?}
DB_DATABASE: ${DB_SUBQL_NAME?}
DB_USER: ${DB_SUBQL_USER?}
DB_PASS: ${DB_SUBQL_PASSWORD?}
command:
- --name=app
- --playground
- --indexer=http://subquery-node:3000
metabase:
image: "metabase/metabase:v0.47.0"
mem_limit: 3000m
depends_on:
postgres:
condition: service_healthy
restart: unless-stopped
environment:
MB_DB_HOST: postgres
MB_DB_PORT: ${DB_POSTGRES_PORT?}
MB_DB_DBNAME: ${DB_METABASE_NAME?}
MB_DB_TYPE: postgres
MB_DB_USER: ${DB_METABASE_USER?}
MB_DB_PASS: ${DB_METABASE_PASSWORD?}
JAVA_TOOL_OPTIONS: "-Xmx4g"
ports:
- 3001:3000
profiles:
- metabase
volumes:
postgres-data: