feat: bootstrap NestJS backend with auth, stations, users, health-check, now-playing
This commit is contained in:
30
scripts/deploy.sh
Normal file
30
scripts/deploy.sh
Normal file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
echo "=== radiOLA Backend Deploy ==="
|
||||
|
||||
# Pull latest changes if in git repo
|
||||
if [ -d .git ]; then
|
||||
git pull origin main || true
|
||||
fi
|
||||
|
||||
# Ensure .env exists
|
||||
if [ ! -f .env ]; then
|
||||
echo "Warning: .env not found. Copying from .env.example"
|
||||
cp .env.example .env
|
||||
fi
|
||||
|
||||
# Build and start
|
||||
echo "Building Docker images..."
|
||||
docker compose build --no-cache
|
||||
|
||||
echo "Starting services..."
|
||||
docker compose up -d
|
||||
|
||||
echo "Running database migrations..."
|
||||
docker compose exec -T app npx prisma migrate deploy
|
||||
|
||||
echo "=== Deploy complete ==="
|
||||
echo "API: http://$(curl -s ifconfig.me || echo 'localhost')"
|
||||
Reference in New Issue
Block a user