Add PUSH_TO_GIT.sh
This commit is contained in:
parent
8bb1496adf
commit
78c524020e
1 changed files with 64 additions and 0 deletions
64
PUSH_TO_GIT.sh
Normal file
64
PUSH_TO_GIT.sh
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
#!/bin/bash
|
||||
# Run this script from the project root to initialize git and push to Forgejo
|
||||
|
||||
set -e
|
||||
|
||||
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$PROJECT_DIR"
|
||||
|
||||
echo "🚀 Initializing git repository and pushing to Forgejo…"
|
||||
|
||||
# Configure git locally
|
||||
git init
|
||||
git config user.email "zgaetano@wilddragon.net"
|
||||
git config user.name "Zac"
|
||||
|
||||
# Create .gitignore
|
||||
cat > .gitignore << 'EOF'
|
||||
# Dependencies
|
||||
node_modules/
|
||||
backend/vendor/
|
||||
|
||||
# Build outputs
|
||||
dist/
|
||||
backend/cmd/moonrelay/ui/
|
||||
*.exe
|
||||
|
||||
# Local state
|
||||
.env
|
||||
.DS_Store
|
||||
.vscode/
|
||||
*.swp
|
||||
|
||||
# Docker
|
||||
Dockerfile (build artifacts)
|
||||
|
||||
# Tailscale state (shouldn't be committed)
|
||||
tsnet/
|
||||
EOF
|
||||
|
||||
# Add everything and commit
|
||||
git add -A
|
||||
git commit -m "Initial commit: Moonlight Relay — Docker app with Go backend + React frontend
|
||||
|
||||
- Go backend: embedded Tailscale (tsnet), mDNS host discovery, REST API
|
||||
- React frontend: Vite + TypeScript, Tailwind CSS
|
||||
- Docker Compose: multi-stage build, ready for TrueNAS SCALE
|
||||
- Embedded SPA: React build baked into the Go binary via go:embed
|
||||
|
||||
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>"
|
||||
|
||||
# Add Forgejo remote (adjust URL to match your instance)
|
||||
# Example: FORGEJO_HOST=git.example.com FORGEJO_USER=your-username
|
||||
read -p "Forgejo host (e.g., git.wilddragon.net): " FORGEJO_HOST
|
||||
read -p "Forgejo username: " FORGEJO_USER
|
||||
|
||||
REMOTE_URL="https://${FORGEJO_HOST}/${FORGEJO_USER}/moonlight-relay.git"
|
||||
git remote add origin "$REMOTE_URL"
|
||||
|
||||
echo ""
|
||||
echo "Next steps:"
|
||||
echo "1. Create the repo on your Forgejo instance (if not already done)"
|
||||
echo "2. Run: git push -u origin main"
|
||||
echo ""
|
||||
echo "Remote URL: $REMOTE_URL"
|
||||
Loading…
Reference in a new issue