From 1e7ff90589210a837b45190ea53dcdc4034145bb Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Sun, 27 Feb 2022 18:37:57 +0700 Subject: [PATCH] Setup env vars and HS --- apps/snowflake/docker-compose.yml | 11 +++++++++-- scripts/configure | 6 ++++++ templates/.env-sample | 5 ++++- templates/torrc-server-sample | 4 ++++ 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/apps/snowflake/docker-compose.yml b/apps/snowflake/docker-compose.yml index 966d359..3ecae43 100644 --- a/apps/snowflake/docker-compose.yml +++ b/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 \ No newline at end of file diff --git a/scripts/configure b/scripts/configure index b59ecd4..61b4380 100755 --- a/scripts/configure +++ b/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}/g" "${template}" sed -i "s//${APP_URBIT_BITCOIN_CONNECTOR_PORT}/g" "${template}" sed -i "s//${APP_URBIT_BITCOIN_CONNECTOR_SERVER_PORT}/g" "${template}" + sed -i "s//${APP_SNOWFLAKE_IP}/g" "${template}" + sed -i "s//${APP_SNOWFLAKE_PORT}/g" "${template}" + sed -i "s//${APP_SNOWFLAKE_PROXY_IP}/g" "${template}" done ########################################################## diff --git a/templates/.env-sample b/templates/.env-sample index 40e97fa..e6881dc 100644 --- a/templates/.env-sample +++ b/templates/.env-sample @@ -144,4 +144,7 @@ APP_TAILSCALE_IP= APP_TAILSCALE_PORT= APP_URBIT_BITCOIN_CONNECTOR_IP= APP_URBIT_BITCOIN_CONNECTOR_PORT= -APP_URBIT_BITCOIN_CONNECTOR_SERVER_PORT= \ No newline at end of file +APP_URBIT_BITCOIN_CONNECTOR_SERVER_PORT= +APP_SNOWFLAKE_IP= +APP_SNOWFLAKE_PORT= +APP_SNOWFLAKE_PROXY_IP= \ No newline at end of file diff --git a/templates/torrc-server-sample b/templates/torrc-server-sample index 5fb60cf..3cb4cbc 100644 --- a/templates/torrc-server-sample +++ b/templates/torrc-server-sample @@ -213,3 +213,7 @@ HiddenServicePort 80 : # urbit-bitcoin-connector Hidden Service HiddenServiceDir /data/app-urbit-bitcoin-connector HiddenServicePort 80 : + +# snowflake Hidden Service +HiddenServiceDir /data/app-snowflake +HiddenServicePort 80 :