Skip to content

Commit 6d97975

Browse files
ImTotemclaude
andcommitted
fix(infra): copy nginx conf to sites-available and symlink to sites-enabled
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 21c6ec6 commit 6d97975

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

infra/scripts/deploy.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ set -euo pipefail
44
COMPOSE="sudo docker compose -p bcsd-app --env-file .env -f infra/docker/docker-compose.yml"
55
COMPOSE_DB="sudo docker compose -p bcsd-db --env-file .env -f infra/docker/docker-compose.db.yml"
66
NGINX_CONF="infra/nginx/bcsd-api.conf"
7-
NGINX_DEST="/etc/nginx/sites-enabled/bcsd-api.conf"
7+
NGINX_AVAILABLE="/etc/nginx/sites-available/bcsd-api.conf"
8+
NGINX_ENABLED="/etc/nginx/sites-enabled/bcsd-api.conf"
89
HEALTH_PATH="/openapi.json"
910
MAX_RETRIES=10
1011

@@ -79,7 +80,8 @@ fi
7980
echo "4. Switching nginx → $NEXT"
8081
sed -i "s/proxy_pass http:\/\/api_${CURRENT}/proxy_pass http:\/\/api_${NEXT}/g" "$NGINX_CONF"
8182
sudo mkdir -p /var/www/certbot
82-
sudo cp "$NGINX_CONF" "$NGINX_DEST"
83+
sudo cp "$NGINX_CONF" "$NGINX_AVAILABLE"
84+
sudo ln -sf "$NGINX_AVAILABLE" "$NGINX_ENABLED"
8385
sudo nginx -t && sudo nginx -s reload
8486

8587
echo "5. Stopping old ($CURRENT)..."

0 commit comments

Comments
 (0)