Files
gitea-docker/entrypoint.sh
2026-04-07 17:46:39 -07:00

19 lines
439 B
Bash

#!/bin/bash
set -e
# Start tailscaled in background
tailscaled &
# Wait for tailscaled to be ready
until tailscale status >/dev/null 2>&1; do
sleep 0.5
done
# Authenticate with Tailscale
tailscale up --authkey="${TAILSCALE_AUTHKEY}" --hostname="${TAILSCALE_HOSTNAME:-gitea}"
echo "Tailscale connected: $(tailscale status --json | grep -o '"Hostname":"[^"]*"' | head -1 | cut -d'"' -f4)"
# Run Gitea
exec docker/entrypoint.sh "$@"