-
-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: includes tailscale for private connections (#327)
* feat: includes tailscale for private connections Functionality is behind a ENABLE_TAILSCALE env var, without which we do not attempt to start tailscale. This should cater for self-hosted setups that don't require tailscale. * fix: move ARG TAILSCALE_VERSION to tailscale scope * fix: adds dependencies * fix: preserves env variables when passing execution to realtime Realtime relies on several vars populated by fly's platform
- Loading branch information
Showing
2 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -x | ||
set -euo pipefail | ||
|
||
if [[ -n "${ENABLE_TAILSCALE}" ]]; then | ||
echo "Enabling Tailscale" | ||
TAILSCALE_APP_NAME="${TAILSCALE_APP_NAME:-${FLY_APP_NAME}-${FLY_REGION}}-${FLY_ALLOC_ID:0:8}" | ||
/tailscale/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/var/run/tailscale/tailscaled.sock & | ||
/tailscale/tailscale up --authkey=${TAILSCALE_AUTHKEY} --hostname="${TAILSCALE_APP_NAME}" --accept-routes=true | ||
fi | ||
|
||
echo "Starting Realtime" | ||
sudo -E -u nobody /app/bin/server |