diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 7158a2f..0c21919 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -48,7 +48,7 @@ jobs: cp /share/np-dms/app/source/lcbp3/specs/04-Infrastructure-OPS/04-00-docker-compose/docker-compose-app.yml /share/np-dms/app/docker-compose-app.yml cd /share/np-dms/app # ⚠️ ลบ container เดิมที่อาจสร้างจาก Container Station - docker rm -f lcbp3-backend lcbp3-frontend 2>/dev/null || true + docker rm -f backend frontend 2>/dev/null || true # 4a. Start Backend ก่อน echo "🟢 Starting Backend..." @@ -57,7 +57,7 @@ jobs: # 4b. รอ Backend healthy (ทุก 5 วิ สูงสุด 60 วิ) echo "⏳ Waiting for Backend health check..." for i in $(seq 1 12); do - if docker inspect --format='{{.State.Health.Status}}' lcbp3-backend 2>/dev/null | grep -q healthy; then + if docker inspect --format='{{.State.Health.Status}}' backend 2>/dev/null | grep -q healthy; then echo "✅ Backend is healthy!" break fi diff --git a/specs/04-Infrastructure-OPS/04-00-docker-compose/docker-compose-app.yml b/specs/04-Infrastructure-OPS/04-00-docker-compose/docker-compose-app.yml index a4cf6cd..2c35275 100644 --- a/specs/04-Infrastructure-OPS/04-00-docker-compose/docker-compose-app.yml +++ b/specs/04-Infrastructure-OPS/04-00-docker-compose/docker-compose-app.yml @@ -13,6 +13,8 @@ # ใช้ Environment Variables ใน Container Station UI # ============================================================ +name: lcbp3 + x-restart: &restart_policy restart: unless-stopped @@ -30,12 +32,12 @@ networks: services: # ---------------------------------------------------------------- # 1. Backend API (NestJS) - # Service Name: backend (ตามที่ NPM อ้างอิง → lcbp3-backend:3000) + # Service Name: backend (ตามที่ NPM อ้างอิง → backend:3000) # ---------------------------------------------------------------- backend: <<: [*restart_policy, *default_logging] image: lcbp3-backend:latest - container_name: lcbp3-backend + container_name: backend stdin_open: true tty: true deploy: @@ -89,12 +91,12 @@ services: # ---------------------------------------------------------------- # 2. Frontend Web App (Next.js) - # Service Name: frontend (ตามที่ NPM อ้างอิง → lcbp3-frontend:3000) + # Service Name: frontend (ตามที่ NPM อ้างอิง → frontend:3000) # ---------------------------------------------------------------- frontend: <<: [*restart_policy, *default_logging] image: lcbp3-frontend:latest - container_name: lcbp3-frontend + container_name: frontend stdin_open: true tty: true deploy: