Build & Deploy / build-and-push (discord-gateway) (push) Failing after 2m22s
Build & Deploy / build-and-push (backend) (push) Failing after 3m22s
Build & Deploy / build-and-push (proxy) (push) Successful in 1m36s
Build & Deploy / deploy (push) Skipped
- Consolidate all DB schema definitions into packages/shared as single source of truth - Migrate backend from raw SQL to Drizzle ORM across all modules - Extract frontend inline UI into separate component files - Refactor discord-gateway circuitBreaker into conversationState + moderationState - Convert messageStore to Proxy singleton pattern - Add validateBody/validateQuery middleware + Zod schemas for API endpoints - Modernize Docker builds with multi-stage + pnpm deploy - Migrate CI/CD from deployment to image-based pipeline - Remove 60+ unused/dead files (~15K lines) - Update color scheme from sky-blue to teal-cyan - Move DB connection management to @bete/shared/database Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
32 lines
876 B
Bash
Executable File
32 lines
876 B
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
INFRA_DIR="$SCRIPT_DIR/infra/docker"
|
|
|
|
: "${VPS_HOST:?required}"
|
|
: "${VPS_USER:?required}"
|
|
: "${VPS_SSH_KEY:?required}"
|
|
|
|
echo "=== Deploy to $VPS_HOST ==="
|
|
|
|
# Copy local .env if it exists (overrides CI env)
|
|
if [ -f "$INFRA_DIR/.env" ]; then
|
|
scp -i "$VPS_SSH_KEY" "$INFRA_DIR/.env" "$VPS_USER@$VPS_HOST:/opt/imphenbot/infra/docker/.env"
|
|
fi
|
|
|
|
ssh -i "$VPS_SSH_KEY" "$VPS_USER@$VPS_HOST" << 'REMOTESCRIPT'
|
|
set -eu
|
|
cd /opt/imphenbot/infra/docker
|
|
echo "=== Pulling images ==="
|
|
docker compose pull
|
|
echo "=== Restarting containers ==="
|
|
docker compose up -d --remove-orphans
|
|
echo "=== Cleaning up ==="
|
|
docker image prune -f
|
|
echo "=== Active containers ==="
|
|
docker ps --filter "name=imphenbot" --format "table {{.Names}} {{.Image}} {{.Status}}"
|
|
REMOTESCRIPT
|
|
|
|
echo "=== Deploy complete ==="
|