2026-04-25 12:57:12 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
|
|
|
|
# Bootstrap script — downloads the Cameleer installer and runs it.
|
|
|
|
|
# Usage:
|
2026-04-25 15:35:32 +02:00
|
|
|
# bash -c "$(curl -fsSL https://get.cameleer.io/install)"
|
|
|
|
|
# bash -c "$(curl -fsSL https://get.cameleer.io/install)" -- --version v1.2.0
|
2026-04-25 12:57:12 +02:00
|
|
|
|
|
|
|
|
REPO="https://registry.cameleer.io/cameleer/cameleer-saas-installer/raw"
|
|
|
|
|
REF="branch/main"
|
|
|
|
|
DIR="./installer"
|
|
|
|
|
|
2026-04-25 15:35:32 +02:00
|
|
|
# Parse --version / --ref (consume them; remaining args are forwarded to install.sh)
|
|
|
|
|
PASS_ARGS=()
|
2026-04-25 12:57:12 +02:00
|
|
|
for arg in "$@"; do
|
|
|
|
|
case "$arg" in
|
2026-04-25 15:35:32 +02:00
|
|
|
--version=*) REF="tag/${arg#*=}" ;;
|
|
|
|
|
--ref=*) REF="branch/${arg#*=}" ;;
|
|
|
|
|
*) PASS_ARGS+=("$arg") ;;
|
2026-04-25 12:57:12 +02:00
|
|
|
esac
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
BASE="$REPO/$REF"
|
|
|
|
|
|
|
|
|
|
FILES=(
|
|
|
|
|
"install.sh"
|
|
|
|
|
"templates/docker-compose.yml"
|
|
|
|
|
"templates/docker-compose.saas.yml"
|
|
|
|
|
"templates/docker-compose.server.yml"
|
|
|
|
|
"templates/docker-compose.tls.yml"
|
|
|
|
|
"templates/docker-compose.monitoring.yml"
|
|
|
|
|
"templates/traefik-dynamic.yml"
|
|
|
|
|
"templates/.env.example"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
echo "Downloading Cameleer installer..."
|
|
|
|
|
|
|
|
|
|
mkdir -p "$DIR/templates"
|
|
|
|
|
|
|
|
|
|
for file in "${FILES[@]}"; do
|
|
|
|
|
echo " $file"
|
|
|
|
|
curl -fsSL "$BASE/$file" -o "$DIR/$file"
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
chmod +x "$DIR/install.sh"
|
|
|
|
|
|
|
|
|
|
echo ""
|
2026-04-25 15:35:32 +02:00
|
|
|
echo "Installer downloaded to $DIR/ — launching..."
|
2026-04-25 12:57:12 +02:00
|
|
|
echo ""
|
|
|
|
|
|
2026-04-25 15:35:32 +02:00
|
|
|
cd "$DIR"
|
|
|
|
|
exec ./install.sh "${PASS_ARGS[@]}"
|