Initial commit — Performance West telecom compliance platform
Includes: API (Express/TypeScript), Astro site, Python workers, document generators, FCC compliance tools, Canada CRTC formation, Ansible infrastructure, and deployment scripts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
f8cd37ac8c
1823 changed files with 145167 additions and 0 deletions
56
scripts/deploy-dev.sh
Executable file
56
scripts/deploy-dev.sh
Executable file
|
|
@ -0,0 +1,56 @@
|
|||
#!/usr/bin/env bash
|
||||
# Deploy to the dev site at dev.performancewest.net.
|
||||
# Usage: bash scripts/deploy-dev.sh
|
||||
#
|
||||
# What it does:
|
||||
# 1. Syncs API source + scripts + site to the dev server
|
||||
# 2. Rebuilds dev API + site Docker containers
|
||||
# 3. No manual docker-cp or _astro merging needed — everything
|
||||
# is in site/public/ and gets built into the image.
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
REMOTE="deploy@207.174.124.71"
|
||||
SSH="ssh -p 22022"
|
||||
SCP="scp -P 22022"
|
||||
DEV_DIR="/opt/performancewest-dev"
|
||||
RSYNC_OPTS="-avz --delete --exclude=node_modules --exclude=.git --exclude='__pycache__' --exclude=dist --exclude=.env --exclude='site-old'"
|
||||
|
||||
echo "=== Syncing source files ==="
|
||||
|
||||
rsync $RSYNC_OPTS \
|
||||
-e "$SSH" \
|
||||
api/src/ "$REMOTE:$DEV_DIR/api/src/"
|
||||
|
||||
rsync $RSYNC_OPTS \
|
||||
-e "$SSH" \
|
||||
api/migrations/ "$REMOTE:$DEV_DIR/api/migrations/"
|
||||
|
||||
rsync $RSYNC_OPTS \
|
||||
-e "$SSH" \
|
||||
scripts/ "$REMOTE:$DEV_DIR/scripts/"
|
||||
|
||||
rsync $RSYNC_OPTS \
|
||||
-e "$SSH" \
|
||||
site/src/ "$REMOTE:$DEV_DIR/site/src/"
|
||||
|
||||
rsync $RSYNC_OPTS \
|
||||
-e "$SSH" \
|
||||
site/public/ "$REMOTE:$DEV_DIR/site/public/"
|
||||
|
||||
# Also sync config files that live at the site root
|
||||
for f in site/Dockerfile site/nginx.conf site/package.json site/astro.config.mjs site/tsconfig.json; do
|
||||
if [ -f "$f" ]; then
|
||||
rsync -avz -e "$SSH" "$f" "$REMOTE:$DEV_DIR/$f"
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "=== Rebuilding containers ==="
|
||||
|
||||
$SSH "$REMOTE" "cd $DEV_DIR && sudo docker compose up -d --build api site workers"
|
||||
|
||||
echo ""
|
||||
echo "=== Deploy complete ==="
|
||||
echo "Dev site: https://dev.performancewest.net"
|
||||
echo "Dev API: https://api.dev.performancewest.net"
|
||||
Loading…
Add table
Add a link
Reference in a new issue