-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.production.yml
115 lines (110 loc) · 2.82 KB
/
docker-compose.production.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
services:
postgres:
build:
context: .
dockerfile: ./docker/pg-Dockerfile
args:
POSTGRES_VERSION: ${POSTGRES_VERSION}
ports:
- 5432:5432
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${POSTGRES_USER}
POSTGRES_USER: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
networks:
- pocketdex
pgadmin:
image: dpage/pgadmin4:${PGADMIN_VERSION}
container_name: pgadmin
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
PGADMIN_LISTEN_PORT: 5050
volumes:
- ./docker/pgadmin/servers.json:/pgadmin4/servers.json
depends_on:
postgres:
condition: service_healthy
ports:
- ${PGADMIN_LISTEN_PORT}:5050
networks:
- pocketdex
subquery-node:
build:
context: .
dockerfile: ./docker/node.dockerfile
args:
GENESIS_FILENAME: ${GENESIS_FILENAME:-testnet.json}
NODE_ENV: ${ENV}
CHAIN_ID: ${CHAIN_ID}
ENDPOINT: ${ENDPOINT}
image: pocket-network/pocketdex:production
pull_policy: build
depends_on:
"postgres":
condition: service_healthy
restart: unless-stopped
environment:
DB_USER: ${POSTGRES_USER}
DB_PASS: ${POSTGRES_PASSWORD}
DB_DATABASE: ${POSTGRES_DB}
DB_HOST: postgres
DB_PORT: 5432
NODE_ENV: ${ENV}
WORKERS: ${WORKERS}
BATCH_SIZE: ${BATCH_SIZE}
DB_SCHEMA: ${DB_SCHEMA}
START_BLOCK: ${START_BLOCK}
ENDPOINT: ${ENDPOINT}
CHAIN_ID: ${CHAIN_ID}
volumes:
- ./genesis/${GENESIS_FILENAME:-testnet.json}:/app/genesis.json
command:
- ${SUBQUERY_NODE_EXTRA_PARAMS:-}
healthcheck:
test: ["CMD", "curl", "-f", "http://subquery-node:3000/ready"]
interval: 3s
timeout: 5s
retries: 10
networks:
- localnet_proxy
- pocketdex
graphql-engine:
image: subquerynetwork/subql-query:${SUBQUERY_GRAPHQL_ENGINE_VERSION}
ports:
- ${SUBQUERY_GRAPHQL_ENGINE_PORT}:3000
depends_on:
"postgres":
condition: service_healthy
"subquery-node":
condition: service_healthy
restart: always
environment:
DB_USER: ${POSTGRES_USER}
DB_PASS: ${POSTGRES_PASSWORD}
DB_DATABASE: ${POSTGRES_DB}
DB_HOST: postgres
DB_PORT: 5432
command:
- ${SUBQUERY_GRAPHQL_EXTRA_PARAMS:-}
- --name=${DB_SCHEMA}
- --indexer=http://subquery-node:3000
- --playground
networks:
- pocketdex
volumes:
postgres_data:
driver: local
networks:
pocketdex:
localnet_proxy:
external: true
attachable: true