From 093137364bc7b4ab3453e68ae5774c3d85fe9005 Mon Sep 17 00:00:00 2001 From: Scott Wallace Date: Mon, 11 Apr 2022 09:48:43 +0100 Subject: [PATCH] Remove the need for the LIGHTHOUSE environment variable --- Dockerfile | 2 +- README.md | 1 - docker-compose.yaml | 1 - seaweedfs-start.sh | 1 + 4 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index aaa0a81..b261e56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,7 +19,7 @@ RUN go install github.com/chrislusf/seaweedfs/weed@latest FROM alpine:3.15 # Install some required tools -RUN apk add fuse go jq +RUN apk add fuse go jq yq RUN go install github.com/square/certstrap@latest ENV PATH=$PATH:/root/go/bin diff --git a/README.md b/README.md index 6d87bc3..f46ebf4 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,6 @@ Distributed & E2EE self-hosting. The goal is to have nodes voluntarily join the 1. Use `config-node.yaml` as the template for a normal cluster node. 2. Use `config-lighthouse.yaml` as the template for a Lighthouse. 4. Update the `docker-compose.yaml` volume values for the bind mount directories for both the Nebula and SeaweedFS config directories; check and set a value for the `/storage` bind mount. - 1. Set the `LIGHTHOUSE` environment variable to `true` for a Lighthouse. 5. Decrypt and un-tar the contents of the `seaweed-conf.enc` file into the SeaweedFS config directory. ```shell openssl enc -aes-256-cbc -iter 30 -d -salt -in seaweed-conf.enc | (cd /path/to/infranet/config/seaweedfs && tar xvz) diff --git a/docker-compose.yaml b/docker-compose.yaml index e6dace7..cdfd353 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -18,5 +18,4 @@ services: - /dev/fuse environment: - TZ=UTC - - LIGHTHOUSE=false restart: unless-stopped diff --git a/seaweedfs-start.sh b/seaweedfs-start.sh index d4a5dc6..23a0a9d 100755 --- a/seaweedfs-start.sh +++ b/seaweedfs-start.sh @@ -3,6 +3,7 @@ BIN_DIR=/app MASTERS=10.10.100.1:9333 # Need an odd number #,10.10.100.21:9333 NODE_IP=$(/app/nebula-cert print -path /etc/nebula/host.crt -json | jq -r '.details.ips[0] | split("/")[0]') +LIGHTHOUSE=$(/usr/bin/yq e '.lighthouse.am_lighthouse' - < /etc/nebula/config.yaml) mkdir /storage/raw