Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
140 lines (134 loc) · 3.4 KB
/
Copy pathdocker-compose.yml
File metadata and controls
140 lines (134 loc) · 3.4 KB
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
services:
actix-trust-service:
build:
context: .
dockerfile: Dockerfile
image: actix-trust-service
hostname: actix-trust-service
container_name: actix-trust-service
restart: unless-stopped
ports:
- "8081:8081"
depends_on:
mongodb_container:
condition: service_started
ipfs:
condition: service_started
iota:
condition: service_healthy
evm-contracts:
condition: service_completed_successfully
env_file:
- ./actix-server/.env
- ./actix-server/.mongo.env
# .env uses localhost; in Compose, use service names instead.
environment:
NODE_URL: http://iota:14265
FAUCET_URL: http://iota:8091/api/enqueue
RPC_PROVIDER: http://evm:8545
volumes:
- trust_data:/var/lib/trust
profiles:
- deploy
# Deploys Asset and AssetFactory to the local EVM chain, then exits
evm-contracts:
image: actix-trust-service
pull_policy: never
entrypoint: ["deploy-contracts"]
env_file:
- ./actix-server/.env
environment:
RPC_PROVIDER: http://evm:8545
depends_on:
evm:
condition: service_healthy
profiles:
- deploy
# Local IOTA Stardust network: two Hornet nodes, coordinator, indexer, faucet and dashboard
iota:
image: iotaledger/hornet-nest:2.0.1@sha256:1ec37ea925d573efa80ea6fe6130169852887d9ce8ee57c04b3a18ed8289f958
# The nest spams 5 blocks/s by default, which only grows the database
entrypoint:
[
"bash",
"-c",
"sed -i 's/--spammer.autostart=true/--spammer.autostart=false/' /etc/supervisor/conf.d/supervisord.conf && exec /usr/bin/supervisord",
]
# The coordinator can't resume if it is killed before saving its state
stop_grace_period: 5m
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"bash",
"-c",
"exec 3<>/dev/tcp/127.0.0.1/14265 && printf 'GET /health HTTP/1.0\\r\\n\\r\\n' >&3 && head -n1 <&3 | grep -q ' 200 ' && exec 4<>/dev/tcp/127.0.0.1/8091",
]
interval: 5s
retries: 30
ports:
- "127.0.0.1:14265:14265"
- "127.0.0.1:8091:8091"
- "127.0.0.1:8082:8081"
volumes:
- iota_data:/app
profiles:
- dev
- deploy
evm:
image: ghcr.io/foundry-rs/foundry:v1.8.4@sha256:f69e1b8d1dda17d89227a4d0513b1d86f93ece430dea8d87aaea643da3607d3e
entrypoint: ["anvil"]
command:
[
"--host",
"0.0.0.0",
"--chain-id",
"1074",
"--state",
"/home/foundry/state.json",
]
restart: unless-stopped
healthcheck:
test: ["CMD", "cast", "chain-id"]
interval: 5s
retries: 30
ports:
- "127.0.0.1:8545:8545"
volumes:
- evm_data:/home/foundry
profiles:
- dev
- deploy
mongodb_container:
image: mongo:latest
restart: unless-stopped
hostname: mongo
ports:
- 27017:27017
env_file:
- ./actix-server/.mongo.env
volumes:
- ./mongodb_data_container:/data/db
profiles:
- dev
- deploy
ipfs:
image: ipfs/kubo:latest
container_name: ipfs
ports:
#- "4001:4001"
- "5001:5001"
#- "8080:8080"
volumes:
- ipfs_data:/data/ipfs
restart: unless-stopped
profiles:
- dev
- deploy
volumes:
mongodb_data_container:
ipfs_data:
trust_data:
iota_data:
evm_data: