mirror of
https://git.victorphan.net/basketballcantho/ten-project.git
synced 2026-08-05 16:43:12 +07:00
hoàn thành bước tạo docker compose
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
# ── Stage 1: deps ─────────────────────────────────────────────────────────────
|
||||
FROM python:3.12-slim AS deps
|
||||
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# ── Stage 2: runtime ──────────────────────────────────────────────────────────
|
||||
FROM python:3.12-slim AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy installed packages from deps stage
|
||||
COPY --from=deps /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
|
||||
COPY --from=deps /usr/local/bin /usr/local/bin
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
|
||||
# Ensure entrypoint is executable
|
||||
RUN chmod +x entrypoint.sh
|
||||
|
||||
# Upload directory (will be mounted as a Docker volume)
|
||||
RUN mkdir -p /uploads
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["./entrypoint.sh"]
|
||||
Reference in New Issue
Block a user