Browse Source

Allow user to set NGINX_PORT (#562)

Co-authored-by: Luke Childs <lukechilds123@gmail.com>
Co-authored-by: nolim1t <hello@nolim1t.co>
fix-mempool-db-check
Jonathan Underwood 4 years ago
committed by GitHub
parent
commit
79c011ea8e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      README.md
  2. 2
      docker-compose.yml
  3. 2
      scripts/configure
  4. 2
      scripts/start
  5. 1
      templates/.env-sample

7
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:

2
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

2
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>/${NETWORK_IP}/g" "${template}"
sed -i "s/<gateway-ip>/${GATEWAY_IP}/g" "${template}"
sed -i "s/<nginx-ip>/${NGINX_IP}/g" "${template}"
sed -i "s/<nginx-port>/${NGINX_PORT}/g" "${template}"
sed -i "s/<dashboard-ip>/${DASHBOARD_IP}/g" "${template}"
sed -i "s/<manager-ip>/${MANAGER_IP}/g" "${template}"
sed -i "s/<middleware-ip>/${MIDDLEWARE_IP}/g" "${template}"

2
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

1
templates/.env-sample

@ -2,6 +2,7 @@
NETWORK_IP=<network-ip>
GATEWAY_IP=<gateway-ip>
NGINX_IP=<nginx-ip>
NGINX_PORT=<nginx-port>
DASHBOARD_IP=<dashboard-ip>
MANAGER_IP=<manager-ip>
MIDDLEWARE_IP=<middleware-ip>

Loading…
Cancel
Save