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

ci: enable buildkit and pip cache mount for super fast build

parent 9cb5f9be
Pipeline #3303 passed with stage
in 2 minutes and 51 seconds
......@@ -6,6 +6,7 @@ deploy_to_server:
# Chế độ shell chạy trực tiếp trên host
script:
- echo "🚀 Bắt đầu quá trình Deploy từ Runner Path..."
- 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"
- cd backend
- docker compose up --build -d
......
......@@ -11,8 +11,9 @@ ENV PYTHONDONTWRITEBYTECODE=1
# Copy requirements.txt trước để tận dụng Docker cache
COPY requirements.txt .
# Cài đặt thư viện Python
RUN pip install --no-cache-dir -r requirements.txt
# Cài đặt thư viện Python (Sử dụng cache mount để siêu nhanh)
RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r requirements.txt
# Copy toàn bộ source code vào image
COPY . .
......
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