Commit f7953c65 authored by Vũ Hoàng Anh's avatar Vũ Hoàng Anh

ci: remove volumes and force replace container to fix html update

parent 1f56f9ce
Pipeline #3304 failed
...@@ -5,11 +5,15 @@ deploy_to_server: ...@@ -5,11 +5,15 @@ deploy_to_server:
stage: deploy stage: deploy
# Chế độ shell chạy trực tiếp trên host # Chế độ shell chạy trực tiếp trên host
script: script:
- echo "🚀 Bắt đầu quá trình Deploy từ Runner Path..." - echo "🚀 Bắt đầu quá trình Deploy Sạch..."
- export DOCKER_BUILDKIT=1 - export DOCKER_BUILDKIT=1
- "if [ -f /home/anhvh/canifa_soure/chatbot-canifa/backend/.env ]; then cp /home/anhvh/canifa_soure/chatbot-canifa/backend/.env backend/.env; fi" - "if [ -f /home/anhvh/canifa_soure/chatbot-canifa/backend/.env ]; then cp /home/anhvh/canifa_soure/chatbot-canifa/backend/.env backend/.env; fi"
- cd backend - cd backend
- docker compose up --build -d - # "Giết" sạch tất cả các bản cũ (kể cả bản bro chạy tay hay bản runner cũ)
- echo "✅ Deploy thành công rực rỡ!" - docker stop canifa_backend || true
- docker rm -f canifa_backend || true
- docker compose -p canifa-chatbot down --remove-orphans || true
- docker compose -p canifa-chatbot up --build -d
- echo "✅ Web ĐÃ CẬP NHẬT THÀNH CÔNG!"
only: only:
- master - master
...@@ -6,8 +6,8 @@ services: ...@@ -6,8 +6,8 @@ services:
env_file: .env env_file: .env
ports: ports:
- "5000:5000" - "5000:5000"
volumes: # volumes:
- .:/app # - .:/app
environment: environment:
- PORT=5000 - PORT=5000
restart: unless-stopped restart: unless-stopped
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment