Browse Source

Setup env vars and HS

snowflake
Luke Childs 3 years ago
parent
commit
1e7ff90589
  1. 11
      apps/snowflake/docker-compose.yml
  2. 6
      scripts/configure
  3. 5
      templates/.env-sample
  4. 4
      templates/torrc-server-sample

11
apps/snowflake/docker-compose.yml

@ -8,12 +8,19 @@ services:
command: "-log /data/snowflake.log -verbose"
volumes:
- ${APP_DATA_DIR}/data:/data
networks:
default:
ipv4_address: $APP_SNOWFLAKE_PROXY_IP
web:
image: getumbrel/gotty:v1.0.1@sha256:100571d271cfbae25603acac216afce511eece9961218c6db427e0fa4a58716a
restart: on-failure
stop_grace_period: 1m
ports:
- 1234:1234
command: --port 1234 bash -c 'tail -n 10000 -f /snowflake/snowflake.log | grep "Traffic Relayed"'
- $APP_SNOWFLAKE_PORT:$APP_SNOWFLAKE_PORT
command: --port $APP_SNOWFLAKE_PORT bash -c 'tail -n 10000 -f /snowflake/snowflake.log | grep "Traffic Relayed"'
volumes:
- ${APP_DATA_DIR}/data:/snowflake
networks:
default:
ipv4_address: $APP_SNOWFLAKE_IP

6
scripts/configure

@ -247,6 +247,9 @@ APP_TAILSCALE_PORT="2100"
APP_URBIT_BITCOIN_CONNECTOR_IP="10.21.21.81"
APP_URBIT_BITCOIN_CONNECTOR_PORT="9090"
APP_URBIT_BITCOIN_CONNECTOR_SERVER_PORT="55555"
APP_SNOWFLAKE_IP="10.21.21.82"
APP_SNOWFLAKE_PORT="3800"
APP_SNOWFLAKE_PROXY_IP="10.21.21.83"
# Generate RPC credentials
if [[ -z ${BITCOIN_RPC_USER+x} ]] || [[ -z ${BITCOIN_RPC_PASS+x} ]] || [[ -z ${BITCOIN_RPC_AUTH+x} ]]; then
@ -494,6 +497,9 @@ for template in "${NGINX_CONF_FILE}" "${BITCOIN_CONF_FILE}" "${LND_CONF_FILE}" "
sed -i "s/<app-urbit-bitcoin-connector-ip>/${APP_URBIT_BITCOIN_CONNECTOR_IP}/g" "${template}"
sed -i "s/<app-urbit-bitcoin-connector-port>/${APP_URBIT_BITCOIN_CONNECTOR_PORT}/g" "${template}"
sed -i "s/<app-urbit-bitcoin-connector-server-port>/${APP_URBIT_BITCOIN_CONNECTOR_SERVER_PORT}/g" "${template}"
sed -i "s/<app-snowflake-ip>/${APP_SNOWFLAKE_IP}/g" "${template}"
sed -i "s/<app-snowflake-port>/${APP_SNOWFLAKE_PORT}/g" "${template}"
sed -i "s/<app-snowflake-proxy-ip>/${APP_SNOWFLAKE_PROXY_IP}/g" "${template}"
done
##########################################################

5
templates/.env-sample

@ -144,4 +144,7 @@ APP_TAILSCALE_IP=<app-tailscale-ip>
APP_TAILSCALE_PORT=<app-tailscale-port>
APP_URBIT_BITCOIN_CONNECTOR_IP=<app-urbit-bitcoin-connector-ip>
APP_URBIT_BITCOIN_CONNECTOR_PORT=<app-urbit-bitcoin-connector-port>
APP_URBIT_BITCOIN_CONNECTOR_SERVER_PORT=<app-urbit-bitcoin-connector-server-port>
APP_URBIT_BITCOIN_CONNECTOR_SERVER_PORT=<app-urbit-bitcoin-connector-server-port>
APP_SNOWFLAKE_IP=<app-snowflake-ip>
APP_SNOWFLAKE_PORT=<app-snowflake-port>
APP_SNOWFLAKE_PROXY_IP=<app-snowflake-proxy-ip>

4
templates/torrc-server-sample

@ -213,3 +213,7 @@ HiddenServicePort 80 <app-tailscale-ip>:<app-tailscale-port>
# urbit-bitcoin-connector Hidden Service
HiddenServiceDir /data/app-urbit-bitcoin-connector
HiddenServicePort 80 <app-urbit-bitcoin-connector-ip>:<app-urbit-bitcoin-connector-port>
# snowflake Hidden Service
HiddenServiceDir /data/app-snowflake
HiddenServicePort 80 <app-snowflake-ip>:<app-snowflake-port>

Loading…
Cancel
Save