All checks were successful
Deploy with Docker Compose / deploy (push) Successful in 4m5s
- New workshop where each team member shares up to 5 GIFs with notes to express their weekly mood - Per-user week rating (1-5 stars) visible next to each member's section - Masonry-style grid with adjustable column count (3/4/5) toggle - Handwriting font (Caveat) for GIF notes - Full real-time collaboration via SSE - Clean migration (add_gif_mood_workshop) safe for production deploy - DB backup via cp before each migration in docker-entrypoint Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
508 B
Bash
23 lines
508 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
DB_PATH="/app/data/dev.db"
|
|
BACKUP_DIR="/app/data/backups"
|
|
|
|
if [ -f "$DB_PATH" ]; then
|
|
mkdir -p "$BACKUP_DIR"
|
|
BACKUP_FILE="$BACKUP_DIR/dev-$(date +%Y%m%d-%H%M%S).db"
|
|
cp "$DB_PATH" "$BACKUP_FILE"
|
|
echo "💾 Database backed up to $BACKUP_FILE"
|
|
|
|
# Keep only the 10 most recent backups
|
|
ls -t "$BACKUP_DIR"/*.db 2>/dev/null | tail -n +11 | xargs rm -f
|
|
fi
|
|
|
|
echo "🔄 Running database migrations..."
|
|
pnpm prisma migrate deploy
|
|
|
|
echo "🚀 Starting application..."
|
|
exec node server.js
|
|
|