-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.yml
179 lines (168 loc) · 4.66 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
#version: '3.5'
# Startup without gear-node.
# Example: docker-compose up -d
# Startup with gear-node. Using profile `--profile gear-node`
# Example: docker-compose --profile gear-node up -d
# Shutdown and clear.
# Stop the container(s) using the following command:
# docker-compose down
# docker rm -f $(docker ps -a -q)
# docker volume rm $(docker volume ls -q)
# Restart the containers using the following command:
# docker-compose up -d
x-restart-policy: &restart_policy
restart: unless-stopped
x-depends_on-healthy: &depends_on-healthy
condition: service_healthy
x-depends_on-default: &depends_on-default
condition: service_started
x-healthcheck-defaults: &healthcheck_defaults
# Avoid setting the interval too small, as docker uses much more CPU than one would expect.
interval: "30s"
timeout: "1m30s"
retries: 10
start_period: 10s
x-database-defaults: &postgres_defaults
<<: *restart_policy
# Using the same postgres version as Sentry dev for consistency purposes
image: "postgres:14.5"
healthcheck:
<<: *healthcheck_defaults
# Using default user "postgres"
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
command:
[
"postgres",
"-c",
"wal_level=logical",
"-c",
"max_replication_slots=1",
"-c",
"max_wal_senders=1",
]
services:
redis:
<<: *restart_policy
image: "redis:6.2.14-alpine"
healthcheck:
<<: *healthcheck_defaults
test: redis-cli ping
ports:
- "6379:6379"
volumes:
- "gear-redis:/data"
ulimits:
nofile:
soft: 10032
hard: 10032
pg-indexer:
<<: *postgres_defaults
environment:
POSTGRES_HOST_AUTH_METHOD: "trust"
POSTGRES_DB: "indexer"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
volumes:
- "gear-postgres-indexer:/var/lib/postgresql/data"
pg-meta:
<<: *postgres_defaults
environment:
POSTGRES_HOST_AUTH_METHOD: "trust"
POSTGRES_DB: "meta"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
volumes:
- "gear-postgres-meta:/var/lib/postgresql/data"
rabbitmq:
<<: *restart_policy
image: "rabbitmq:3.11"
ports:
- 5672:5672
- 15672:15672
environment:
RABBITMQ_DEFAULT_USER: "guest"
RABBITMQ_DEFAULT_PASS: "guest"
RABBITMQ_DEFAULT_VHOST: "/"
healthcheck:
<<: *healthcheck_defaults
test: ["CMD-SHELL", "rabbitmq-diagnostics -q ping"]
ulimits:
nofile:
soft: 10032
hard: 10032
volumes:
- "gear-rabbitmq:/var/lib/rabbitmq"
api-gateway:
<<: *restart_policy
image: ghcr.io/gear-tech/gear-js-api-gateway:qa
ports:
- 3000:3000
depends_on:
rabbitmq:
<<: *depends_on-healthy
redis:
<<: *depends_on-healthy
environment:
RABBIT_MQ_URL: amqp://guest:guest@rabbitmq:5672
CAPTCH_SECRET: '0xfF8C6A74C8EcD1Db7A7A5772F815255f4B661197'
CRON_TIME: 0 */3 * * *
REDIS_HOST: redis
REDIS_PORT: '6379'
meta-storage:
<<: *restart_policy
depends_on:
rabbitmq:
<<: *depends_on-healthy
pg-meta:
<<: *depends_on-healthy
image: ghcr.io/gear-tech/gear-js-meta-storage:qa
environment:
DB_NAME: meta
DB_USER: postgres
DB_PASSWORD: postgres
DB_HOST: pg-meta
RMQ_URL: amqp://guest:guest@rabbitmq:5672
gear-node:
profiles: ["gear-node"]
<<: *restart_policy
ports:
- "30333:30333"
- "9933:9933"
- "9944:9944"
- "9615:9615"
image: "ghcr.io/gear-tech/node:0.1.0-05339e21"
entrypoint: "/usr/local/bin/gear"
command: ["--dev",
# "--base-path /gear",
"--tmp",
"--unsafe-ws-external",
"--unsafe-rpc-external",
"--rpc-methods", "Unsafe",
"--rpc-cors", "all"]
#environment:
volumes:
- "gear-data:/gear"
#- "/tmp/gear/gear-data/:/gear/"
indexer:
<<: *restart_policy
depends_on:
rabbitmq:
<<: *depends_on-healthy
pg-indexer:
<<: *depends_on-healthy
image: ghcr.io/gear-tech/gear-js-indexer:qa
environment:
DB_NAME: indexer
DB_USER: postgres
DB_PASSWORD: postgres
DB_HOST: pg-indexer
RABBIT_MQ_URL: amqp://guest:guest@rabbitmq:5672
GEAR_WS_PROVIDER: ws://gear-node:9944 # If you run the command without specifying the --profile option for gear-node, please provide the address of your node
volumes:
# These store application data that should persist across restarts.
gear-postgres-meta:
gear-postgres-indexer:
gear-redis:
gear-rabbitmq:
gear-api-gateway:
gear-data: