This repository has been archived by the owner on Aug 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
69 lines (65 loc) · 1.74 KB
/
docker-compose.yaml
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
services:
farmerbot:
image: ghcr.io/threefoldtech/farmerbot:0.2.0
restart: always
depends_on:
redis:
condition: service_healthy
rmbpeer:
condition: service_started
grid3_client:
condition: service_healthy
volumes:
- ./config:/farmerbot
command: -c /farmerbot/ --grid3 "http://grid3_client:3000" --redis "redis:6379" --debug --output /farmerbot/farmerbot.log
rmbpeer:
image: ghcr.io/threefoldtech/rmb-peer:v1.0.7
restart: always
depends_on:
redis:
condition: service_healthy
grid3_client:
condition: service_healthy
entrypoint: /bin/sh -c
command:
[
"/usr/sbin/rmb-peer --redis redis://redis:6379 --mnemonic \"$SECRET\" --relay \"$RELAY\" --substrate \"$SUBSTRATE\" -d"
]
grid3_client:
image: ghcr.io/threefoldtech/grid_http_server:2.1.0
restart: always
depends_on:
redis:
condition: service_healthy
entrypoint: /bin/sh -c
command:
[
"echo \"{\\\"network\\\":\\\"$NETWORK\\\",\\\"mnemonic\\\":\\\"$SECRET\\\",\\\"rmb_proxy\\\":false,\\\"keypairType\\\":\\\"sr25519\\\"}\" > ~/config.json && yarn grid_http_server -c ~/config.json"
]
ports:
- '3000'
healthcheck:
test:
[
"CMD-SHELL",
"curl --fail -X POST -H \"Content-Type: application/json\" http://127.0.0.1:3000/ping || exit 1"
]
interval: 10s
timeout: 3s
retries: 30
redis:
image: redis:7.0.8-alpine
restart: always
ports:
- '6379'
command: --save 20 1
volumes:
- db:/data
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 1s
timeout: 3s
retries: 30
volumes:
db:
driver: local