-
Notifications
You must be signed in to change notification settings - Fork 43
/
docker-compose-dev.yaml
executable file
·147 lines (143 loc) · 3.91 KB
/
docker-compose-dev.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
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
version: '3.9'
services:
audit-protocol:
image: powerloom-audit-protocol
expose:
- 9000
- 9002
- 9030
ports:
- 9000:9000
- 9002:9002
- 9030:9030
depends_on:
redis:
condition: service_healthy
rabbitmq:
condition: service_healthy
volumes:
- local_cache:/home/ubuntu/local_cache/
- ./logs/audit-protocol:/root/.pm2/logs
links:
- "ipfs"
- "redis"
- "rabbitmq"
environment:
- SIGNER_ACCOUNT_ADDRESS=$SIGNER_ACCOUNT_ADDRESS
- SIGNER_ACCOUNT_PRIVATE_KEY=$SIGNER_ACCOUNT_PRIVATE_KEY
- PROST_RPC_URL=$PROST_RPC_URL
- IPFS_URL=$IPFS_URL
- IPFS_API_KEY=$IPFS_API_KEY
- IPFS_API_SECRET=$IPFS_API_SECRET
- PROTOCOL_STATE_CONTRACT=$PROTOCOL_STATE_CONTRACT
- RELAYER_HOST=$RELAYER_HOST
- SLACK_REPORTING_URL=$SLACK_REPORTING_URL
- POWERLOOM_REPORTING_URL=$POWERLOOM_REPORTING_URL
- WEB3_STORAGE_TOKEN=$WEB3_STORAGE_TOKEN
- NAMESPACE=$NAMESPACE
- PROST_CHAIN_ID=$PROST_CHAIN_ID
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 40s
command:
bash -c "sh snapshotter_autofill.sh && sh init_processes.sh"
pooler:
image: powerloom-pooler
depends_on:
audit-protocol:
condition: service_healthy
links:
- "ipfs"
- "redis"
- "rabbitmq"
expose:
- 8002
- 8555
ports:
- 8002:8002
- 8555:8555
volumes:
- local_cache:/home/ubuntu/local_cache/
- ./pooler/snapshotter:/snapshotter
- ./pooler/config:/config
- ./logs/pooler:/logs
environment:
- SIGNER_ACCOUNT_ADDRESS=$SIGNER_ACCOUNT_ADDRESS
- SIGNER_ACCOUNT_PRIVATE_KEY=$SIGNER_ACCOUNT_PRIVATE_KEY
- SOURCE_RPC_URL=$SOURCE_RPC_URL
- PROST_RPC_URL=$PROST_RPC_URL
- IPFS_URL=$IPFS_URL
- IPFS_API_KEY=$IPFS_API_KEY
- IPFS_API_SECRET=$IPFS_API_SECRET
- PROTOCOL_STATE_CONTRACT=$PROTOCOL_STATE_CONTRACT
- SLACK_REPORTING_URL=$SLACK_REPORTING_URL
- POWERLOOM_REPORTING_URL=$POWERLOOM_REPORTING_URL
- WEB3_STORAGE_TOKEN=$WEB3_STORAGE_TOKEN
- NAMESPACE=$NAMESPACE
- RELAYER_HOST=$RELAYER_HOST
- PROST_CHAIN_ID=$PROST_CHAIN_ID
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8002/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
command:
bash -c "sh snapshotter_autofill.sh && sh init_processes.sh"
redis:
command: redis-server --appendonly yes --maxclients 10000000
image: "redis:alpine"
expose:
- 6379
ports:
- 6379:6379
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
restart: on-failure
rabbitmq:
image: rabbitmq:3-management
#command: ["daemon"]
expose:
- 15672
- 5672
ports:
- 5672:5672
- 15672:15672
healthcheck:
test: rabbitmq-diagnostics check_port_connectivity
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
restart: on-failure
ipfs:
image: ipfs/kubo:release
profiles: ["ipfs"]
environment:
- IPFS_PROFILE=server
entrypoint: >
/bin/sh -c "
echo 'adding cronjob';
mkdir -p /var/spool/cron/crontabs;
croncmd=\"cd /data/ipfs && find . -type f -mtime +7 -name \\"*.data\\" | xargs rm -f 2>&1\";
cronjob=\"0 * * * * $$croncmd\";
( crontab -l | grep -v -F \"$$croncmd\" ; echo \"$$cronjob\" ) | crontab -;
echo 'starting ipfs';
/sbin/tini -- /usr/local/bin/start_ipfs daemon --migrate=true --agent-version-suffix=docker;
"
#command:
# ["daemon", "--migrate=true", "--agent-version-suffix=docker"]
expose:
- 5001
ports:
- 5001:5001
restart: on-failure
volumes:
local_cache: