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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user