diff --git a/README.md b/README.md index 1c05a60..ce887da 100644 --- a/README.md +++ b/README.md @@ -52,11 +52,18 @@ curl -L https://github.com/getumbrel/umbrel/archive/v0.3.5.tar.gz | tar -xz --st # To use Umbrel on mainnet, run: sudo ./scripts/start +# The following environment settings can only be set +# during first run of the start script and will be persisted through +# any updates + # For testnet, run: sudo NETWORK=testnet ./scripts/start # For regtest, run: sudo NETWORK=regtest ./scripts/start + +# For umbrel to listen on port 12345 instead of 80, run: +sudo NGINX_PORT=12345 ./scripts/start ``` To stop Umbrel, run: diff --git a/docker-compose.yml b/docker-compose.yml index fd2cb46..6948f77 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,7 +30,7 @@ services: restart: on-failure stop_grace_period: 30s ports: - - "80:80" + - "${NGINX_PORT}:80" networks: default: ipv4_address: $NGINX_IP diff --git a/scripts/configure b/scripts/configure index aca0bec..505f7a4 100755 --- a/scripts/configure +++ b/scripts/configure @@ -105,6 +105,7 @@ ENV_FILE="./templates/.env" NETWORK_IP="10.21.21.0" GATEWAY_IP="10.21.21.1" NGINX_IP="10.21.21.2" +NGINX_PORT="${NGINX_PORT:-80}" DASHBOARD_IP="10.21.21.3" MANAGER_IP="10.21.21.4" MIDDLEWARE_IP="10.21.21.5" @@ -267,6 +268,7 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" " sed -i "s//${NETWORK_IP}/g" "${template}" sed -i "s//${GATEWAY_IP}/g" "${template}" sed -i "s//${NGINX_IP}/g" "${template}" + sed -i "s//${NGINX_PORT}/g" "${template}" sed -i "s//${DASHBOARD_IP}/g" "${template}" sed -i "s//${MANAGER_IP}/g" "${template}" sed -i "s//${MIDDLEWARE_IP}/g" "${template}" diff --git a/scripts/start b/scripts/start index b68ef40..6b52418 100755 --- a/scripts/start +++ b/scripts/start @@ -38,7 +38,7 @@ fi # Configure Umbrel if it isn't already configured if [[ ! -f "${UMBREL_ROOT}/statuses/configured" ]]; then - NETWORK="${NETWORK:-mainnet}" "${UMBREL_ROOT}/scripts/configure" + NGINX_PORT=${NGINX_PORT:-80} NETWORK="${NETWORK:-mainnet}" "${UMBREL_ROOT}/scripts/configure" fi echo diff --git a/templates/.env-sample b/templates/.env-sample index 63c34f1..22514c7 100644 --- a/templates/.env-sample +++ b/templates/.env-sample @@ -2,6 +2,7 @@ NETWORK_IP= GATEWAY_IP= NGINX_IP= +NGINX_PORT= DASHBOARD_IP= MANAGER_IP= MIDDLEWARE_IP=