-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
106 lines (101 loc) · 2.84 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
96
97
98
99
100
101
102
103
104
105
106
services:
chain:
image: ${CHAIN_IMAGE}
init: true # Faster shutdown by container process not be PID 1
restart: unless-stopped
ports:
# expose ports to localhost
- '9944:9944' # ws://
- '9933:9933' # http://
- '30333:30333' # for other nodes
extra_hosts:
- 'host.docker.internal:host-gateway'
volumes:
- './compose/chain-entry.sh:/chain-entry.sh'
entrypoint: '/chain-entry.sh'
command: [ '--alice --chain dev' ]
healthcheck:
test: "timeout 5 bash -c 'cat < /dev/null > /dev/tcp/localhost/9933' && exit 0 || exit 1"
interval: 5s
timeout: 5s
retries: 20
start_period: 10s
subquery:
platform: 'linux/amd64'
image: '${SUBQUERY_IMAGE}'
init: true
restart: unless-stopped
depends_on:
postgres:
condition: service_started
chain:
condition: service_healthy
environment:
START_BLOCK: 1
NETWORK_ENDPOINT: ws://chain:9944
NETWORK_HTTP_ENDPOINT: http://chain:9933
DB_USER: '${PG_USER:-postgres}'
DB_PASS: '${PG_PASSWORD:-postgres}'
DB_DATABASE: '${PG_DB:-postgres}'
DB_PORT: '${PG_PORT:-5432}'
DB_HOST: '${PG_HOST:-postgres}'
NODE_ENV: local
command:
- --batch-size=500
- -f=/app
- --local
healthcheck:
test: curl --fail http://localhost:3000/meta || exit 1
interval: 10s
retries: 20
start_period: 20s
timeout: 10s
graphql:
image: onfinality/subql-query:v2.13.0
restart: unless-stopped
ports:
- ${SQ_PORT:-3001}:3000
depends_on:
postgres:
condition: service_started
subquery:
condition: service_healthy
environment:
DB_DATABASE: postgres
DB_USER: '${PG_USER:-postgres}'
DB_PASS: '${PG_PASSWORD:-postgres}'
DB_PORT: '${PG_PORT:-5432}'
DB_HOST: '${PG_HOST:-postgres}'
command:
- --name=public
- --playground
- --indexer=http://subquery:3000
artemis:
image: apache/activemq-artemis:2.31.2
ports:
- 8161:8161 # Web Server
- 61616:61616 # Core,MQTT,AMQP,HORNETQ,STOMP,OpenWire
- 5672:5672 # AMQP
volumes:
- './compose/broker.xml:/var/lib/artemis-instance/etc-override/broker.xml'
environment:
ARTEMIS_USERNAME: artemis
ARTEMIS_PASSWORD: artemis
AMQ_EXTRA_ARGS: "--nio" # "aio" offers better performance, but less platforms support it
postgres:
image: postgres:15
ports:
- $REST_POSTGRES_PORT:5432
volumes:
- db-data:/var/lib/postgresql/data
- ./compose/init-db.sh:/docker-entrypoint-initdb.d/init-db.sh
environment:
POSTGRES_USER: $REST_POSTGRES_USER
POSTGRES_PASSWORD: $REST_POSTGRES_PASSWORD
healthcheck:
test: [ 'CMD-SHELL', 'pg_isready -U postgres' ]
interval: 3s
timeout: 3s
retries: 10
volumes:
db-data: