generated from PolymeshAssociation/typescript-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
142 lines (135 loc) · 3.7 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
services:
postgres:
image: postgres:12-alpine
restart: unless-stopped
ports:
- ${PG_PORT:-5432}:5432
volumes:
- './docker/pg-extensions.sh:/docker-entrypoint-initdb.d/load-extensions.sh'
environment:
POSTGRES_PASSWORD: postgres
vault:
image: hashicorp/vault
restart: unless-stopped
ports:
- ${VAULT_PORT:-8200}:8200
cap_add:
- IPC_LOCK
entrypoint: vault server -dev -dev-listen-address="0.0.0.0:8200" -dev-root-token-id="root"
vault-init:
build:
context: ./docker
dockerfile: vault-init.dockerfile
depends_on:
- vault
restart: 'no'
artemis:
image: apache/activemq-artemis:2.31.2
ports:
- 8161:8161 # Web Server
- 5672:5672 # AMQP
volumes:
- './docker/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
alice:
healthcheck:
test: "timeout 5 bash -c 'cat < /dev/null > /dev/tcp/localhost/9933' && exit 0 || exit 1"
interval: 10s
timeout: 5s
retries: 10
start_period: 10s
image: ${CHAIN_IMAGE}
init: true # Faster shutdown by container process not be PID 1
restart: unless-stopped
ports: # expose ports to localhostpoint to dockerfile
- '9944:9944' # ws://
- '9933:9933' # http://
- '30333:30333' # for other nodes
volumes:
- './docker/chain-entry.sh:/chain-entry.sh'
entrypoint: '/chain-entry.sh'
command: ['--alice --chain dev']
subquery:
image: ${SUBQUERY_INDEXER_IMAGE}
platform: linux/amd64
init: true
healthcheck:
test: curl --fail http://localhost:3000/meta || exit 1
interval: 20s
retries: 30
start_period: 40s
timeout: 20s
restart: unless-stopped
depends_on:
postgres:
condition: service_started
alice:
condition: service_healthy
ports:
- 3002:3000
environment:
START_BLOCK: 1
NETWORK_ENDPOINT: ws://alice:9944
NETWORK_HTTP_ENDPOINT: http://alice: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
graphql:
image: onfinality/subql-query:v2.8.0
ports:
- ${SQ_PORT:-3001}:3000
depends_on:
postgres:
condition: service_started
subquery:
condition: service_healthy
restart: unless-stopped
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
rest-api:
image: ${REST_IMAGE}
platform: linux/amd64
init: true
restart: unless-stopped
depends_on:
alice:
condition: service_started
vault:
condition: service_started
graphql:
condition: service_started
subquery:
condition: service_healthy
artemis:
condition: service_started
ports:
- ${REST_PORT:-3004}:3000
environment:
POLYMESH_NODE_URL: 'ws://alice:9944'
POLYMESH_MIDDLEWARE_V2_URL: 'http://graphql:3000'
VAULT_URL: 'http://vault:8200/v1/transit'
VAULT_TOKEN: 'root'
AUTH_STRATEGY: 'open'
DEVELOPER_UTILS: 'true'
ARTEMIS_HOST: artemis
ARTEMIS_USERNAME: artemis
ARTEMIS_PASSWORD: artemis
ARTEMIS_PORT: 5672