diff --git a/Makefile b/Makefile index 818efd82..56156d18 100644 --- a/Makefile +++ b/Makefile @@ -93,8 +93,9 @@ docker: docker exec tmp-make-cluster-test sh -c "ipfs-cluster-service -v" docker kill tmp-make-cluster-test + docker-compose: - docker-compose up -d + CLUSTER_SECRET=$(shell od -vN 32 -An -tx1 /dev/urandom | tr -d ' \n') docker-compose up -d sleep 20 docker exec cluster0 ipfs-cluster-ctl peers ls | grep -o "Sees 1 other peers" | uniq -c | grep 2 docker exec cluster1 ipfs-cluster-ctl peers ls | grep -o "Sees 1 other peers" | uniq -c | grep 2 diff --git a/docker-compose.yml b/docker-compose.yml index af414614..b46762fd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,8 +38,7 @@ services: depends_on: - ipfs0 environment: - # Change this! Same for all peers! - CLUSTER_SECRET: adc72159e0ce63350c13de6a5e4d3b2f500232a770cb8c3e7829fc514d89d109 + CLUSTER_SECRET: ${CLUSTER_SECRET} # From shell variable IPFS_API: /dns4/ipfs0/tcp/5001 ports: - "127.0.0.1:9094:9094" # API @@ -69,8 +68,7 @@ services: - cluster0 - ipfs1 environment: - # Change this! Same for all peers! - CLUSTER_SECRET: adc72159e0ce63350c13de6a5e4d3b2f500232a770cb8c3e7829fc514d89d109 + CLUSTER_SECRET: ${CLUSTER_SECRET} # From shell variable IPFS_API: /dns4/ipfs1/tcp/5001 ports: - "127.0.0.1:9194:9094" # API