feat: initial sbsports deployment setup

Add Coolify/Woodpecker CI config, .gitignore, and deployment scripts.
This commit is contained in:
alexandrump
2026-04-22 01:01:42 +02:00
commit 78c5ed52ac
32 changed files with 6088 additions and 0 deletions

39
scripts/activate-woodpecker.sh Executable file
View File

@@ -0,0 +1,39 @@
#!/bin/bash
set -e
# Activate sbsports repository in Woodpecker CI
# Prerequisites: WP_TOKEN, Gitea remote ID
WP_TOKEN="${WP_TOKEN:-}"
WP_API="https://ci.thax.es/api"
GITEA_REMOTE_ID="${SBSPORTS_REPO_ID:-}"
if [ -z "$WP_TOKEN" ]; then
echo "Error: WP_TOKEN not set"
echo "Usage: WP_TOKEN=your_token SBSPORTS_REPO_ID=34 ./scripts/activate-woodpecker.sh"
exit 1
fi
if [ -z "$GITEA_REMOTE_ID" ]; then
echo "Error: SBSPORTS_REPO_ID not set (Gitea remote ID)"
exit 1
fi
echo "=== Activating sbsports in Woodpecker ==="
echo ""
# 1. Activate the repository
echo "Activating repository (Gitea remote ID: $GITEA_REMOTE_ID)..."
curl -sSLk -X POST "$WP_API/repos?forge_remote_id=$GITEA_REMOTE_ID" \
-H "Authorization: Bearer $WP_TOKEN" | jq '.'
echo ""
echo "2. Set the following secrets in Woodpecker (via UI or API):"
echo " - gitea_user (username for git.thax.es registry)"
echo " - gitea_token (token for git.thax.es registry)"
echo " - coolify_api_token (Coolify API token)"
echo ""
echo "3. After setting up Coolify, add:"
echo " - SBSPORTS_COOLIFY_UUID (service UUID from Coolify)"
echo ""
echo "Done!"

37
scripts/coolify-setup.sh Executable file
View File

@@ -0,0 +1,37 @@
#!/bin/bash
set -e
# Coolify setup script for sbsports
# Prerequisites: Coolify API token
COOLIFY_API_TOKEN="${COOLIFY_API_TOKEN:-}"
COOLIFY_API="https://panel.thax.es/api/v1"
if [ -z "$COOLIFY_API_TOKEN" ]; then
echo "Error: COOLIFY_API_TOKEN not set"
echo "Usage: COOLIFY_API_TOKEN=your_token ./scripts/coolify-setup.sh"
exit 1
fi
echo "=== sbsports Coolify Setup ==="
echo ""
# 1. List existing projects
echo "1. Listing existing projects..."
curl -sSLk "$COOLIFY_API/projects" \
-H "Authorization: Bearer $COOLIFY_API_TOKEN" | jq '.'
echo ""
echo "2. Create a Docker Compose service in Coolify:"
echo " - Go to: https://panel.thax.es"
echo " - Create a new project (or use existing)"
echo " - Add a new Docker Compose service"
echo " - Paste the contents of coolify/docker-compose.yml"
echo " - Deploy"
echo ""
echo "3. After creation, get the UUID from the service details"
echo " - Set SBSPORTS_COOLIFY_UUID environment variable"
echo " - Add it to Woodpecker secrets"
echo ""
echo "4. To activate the repo in Woodpecker (optional):"
echo " SBSPORTS_REPO_ID=your_gitea_remote_id ./scripts/activate-woodpecker.sh"