Add favicon and prod deploy script
All checks were successful
Build & Deploy Staging / build-and-deploy (release) Successful in 1m23s
All checks were successful
Build & Deploy Staging / build-and-deploy (release) Successful in 1m23s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
||||||
<title>Golf Card Game</title>
|
<title>Golf Card Game</title>
|
||||||
|
<link rel="icon" type="image/svg+xml" href="golfball-logo.svg">
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="style.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
42
scripts/deploy-prod.sh
Executable file
42
scripts/deploy-prod.sh
Executable file
@@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
TAG="${1:?Usage: deploy-prod.sh <tag> (e.g. v3.3.2)}"
|
||||||
|
DROPLET="root@165.245.152.51"
|
||||||
|
IMAGE="git.adlee.work/alee/golfgame"
|
||||||
|
|
||||||
|
echo "Deploying $TAG to production ($DROPLET)..."
|
||||||
|
|
||||||
|
ssh $DROPLET bash -s "$TAG" "$IMAGE" <<'REMOTE'
|
||||||
|
set -e
|
||||||
|
TAG="$1"
|
||||||
|
IMAGE="$2"
|
||||||
|
|
||||||
|
cd /opt/golfgame
|
||||||
|
|
||||||
|
# Pull the image that passed staging
|
||||||
|
docker pull "$IMAGE:$TAG"
|
||||||
|
docker tag "$IMAGE:$TAG" golfgame-app:latest
|
||||||
|
|
||||||
|
# Update code for compose/env changes
|
||||||
|
git fetch origin
|
||||||
|
git checkout "$TAG"
|
||||||
|
|
||||||
|
# Restart app
|
||||||
|
docker compose -f docker-compose.prod.yml up -d app
|
||||||
|
|
||||||
|
# Wait for healthy
|
||||||
|
echo "Waiting for health check..."
|
||||||
|
for i in $(seq 1 30); do
|
||||||
|
if docker compose -f docker-compose.prod.yml ps app | grep -q "healthy"; then
|
||||||
|
echo "Production deploy successful — $TAG"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
echo "CRITICAL: app not healthy after 60s"
|
||||||
|
docker compose -f docker-compose.prod.yml logs --tail=30 app
|
||||||
|
exit 1
|
||||||
|
REMOTE
|
||||||
|
|
||||||
|
echo "Done."
|
||||||
Reference in New Issue
Block a user