-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
64 lines (56 loc) · 1.93 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
version: '3'
services:
nebula:
restart: always
image: cryptorado/nebula:v1.1.0
volumes:
- "./config:/etc/nebula:ro"
cap_add:
- NET_ADMIN
devices:
- /dev/net/tun
ports:
- "${CRYPTORADO_NEBULA_PORT}:4242/udp"
command: ["nebula", "-config", "${CRYPTORADO_NEBULA_CONFIG}"]
ipfs:
restart: always
image: cryptorado/go-ipfs:v0.4.23
volumes:
- "./ipfs_data:/data/ipfs"
entrypoint: /bin/sh
environment:
IPFS_PROFILE: lowpower
command:
- "-c"
- >-
/usr/local/bin/start_ipfs daemon
--migrate=true --mount=false --enable-namesys-pubsub
ipfs-cluster:
restart: always
image: cryptorado/ipfs-cluster:v0.12.1
network_mode: "service:nebula"
volumes:
- "./ipfs_data/ipfs-cluster:/data/ipfs-cluster"
- "./config/ipfs_cluster_service.json:/ipfs_cluster_service.json:ro"
- "./config/ipfs_cluster_secret.txt:/ipfs_cluster_secret.txt:ro"
- "./peerstore_default.txt:/peerstore_default.txt:ro"
- "./ipfs_data/export:/export:ro"
entrypoint: /bin/sh
command:
- "-c"
- >-
if [ ! -f /data/ipfs-cluster/service.json ]; then
echo "cluster configuration not initialized, initializing";
ipfs-cluster-service init;
echo "writing default peerstore file";
cp /peerstore_default.txt /data/ipfs-cluster/peerstore;
fi;
echo "installing our service.json (in case it needs updating)";
cp /ipfs_cluster_service.json /data/ipfs-cluster/service.json;
echo "setting secret into service.json";
CLUSTER_SECRET=$$(cat /ipfs_cluster_secret.txt);
sed -i "s/CLUSTER_SECRET/$$CLUSTER_SECRET/" /data/ipfs-cluster/service.json;
echo "ensuring /data/ipfs-cluster is writeable by user";
chown -R 1000:1000 /data/ipfs-cluster;
echo "ipfs-cluster is initialized, running";
/usr/local/bin/entrypoint.sh -d daemon