Skip to content
Permalink
Browse files

Set CLUSTER_SECRET from shell

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
  • Loading branch information...
hsanjuan committed Oct 24, 2018
1 parent 2a62edd commit 0bab730030e52e4c75eb292b0acb48920f559341
Showing with 4 additions and 5 deletions.
  1. +2 −1 Makefile
  2. +2 −4 docker-compose.yml
@@ -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
@@ -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

0 comments on commit 0bab730

Please sign in to comment.
You can’t perform that action at this time.