Fix: add --network-alias to docker run in deploy workflow

Containers restarted via docker run lose their docker-compose service name
aliases. Added --network-alias frontend/cp so nginx can resolve them by
service name. Also reload nginx after each deploy.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-17 01:13:44 +03:00
parent 526a9eefcf
commit a66c1f6035

View File

@@ -34,6 +34,7 @@ jobs:
docker run -d \
--name hotelsync-frontend \
--network hotelsync_hotelsync-net \
--network-alias frontend \
--restart unless-stopped \
hotelsync-frontend:latest
echo "✅ Frontend started"
@@ -45,10 +46,14 @@ jobs:
docker run -d \
--name hotelsync-cp \
--network hotelsync_hotelsync-net \
--network-alias cp \
--restart unless-stopped \
hotelsync-cp:latest
echo "✅ CP started"
- name: Reload nginx
run: docker exec hotelsync-nginx nginx -s reload
- name: Health check
run: |
sleep 3