fixe ci
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
CD - Build & Deploy / deploy-staging (push) Has been cancelled
CD - Build & Deploy / build-and-push (push) Has been cancelled
CD - Build & Deploy / package-helm (push) Has been cancelled
CD - Build & Deploy / deploy-production (push) Has been cancelled
CD - Build & Deploy / release (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / security (push) Has been cancelled
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
CD - Build & Deploy / deploy-staging (push) Has been cancelled
CD - Build & Deploy / build-and-push (push) Has been cancelled
CD - Build & Deploy / package-helm (push) Has been cancelled
CD - Build & Deploy / deploy-production (push) Has been cancelled
CD - Build & Deploy / release (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
CI / security (push) Has been cancelled
This commit is contained in:
26
Dockerfile
26
Dockerfile
@@ -10,7 +10,7 @@ ARG BUILD_DATE
|
||||
# ============================================
|
||||
# Stage 1: Builder
|
||||
# ============================================
|
||||
FROM python:${PYTHON_VERSION}-slim as builder
|
||||
FROM python:${PYTHON_VERSION}-slim AS builder
|
||||
|
||||
# Re-declare ARGs for this stage
|
||||
ARG NODE_VERSION=20
|
||||
@@ -48,17 +48,30 @@ COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
|
||||
pip install --no-cache-dir --user -r requirements.txt
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
# Copy application code (excluding .dockerignore items)
|
||||
COPY --chown=root:root . .
|
||||
|
||||
# Initialize and build Reflex app
|
||||
RUN python -m reflex init --template blank && \
|
||||
python -m reflex export --frontend-only --no-zip || true
|
||||
|
||||
# Clean up unnecessary files
|
||||
RUN find /build -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true && \
|
||||
# Aggressive cleanup to reduce layer size
|
||||
RUN set -ex && \
|
||||
# Remove Python cache
|
||||
find /build -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true && \
|
||||
find /build -type f -name "*.pyc" -delete && \
|
||||
find /build -type f -name "*.pyo" -delete
|
||||
find /build -type f -name "*.pyo" -delete && \
|
||||
# Remove development files
|
||||
rm -rf /build/tests /build/docs /build/scripts && \
|
||||
rm -rf /build/.git /build/.github /build/.vscode && \
|
||||
rm -rf /build/venv /build/env && \
|
||||
# Remove build artifacts that were created
|
||||
rm -rf /build/.web /build/node_modules && \
|
||||
# Remove large duplicate assets from root
|
||||
rm -f /build/*.gif /build/*.mp4 /build/*.mov 2>/dev/null || true && \
|
||||
# Keep only necessary configs
|
||||
find /build -type f -name "docker-compose*.yml" -delete && \
|
||||
find /build -type f -name "Makefile" -delete
|
||||
|
||||
# ============================================
|
||||
# Stage 2: Runtime
|
||||
@@ -78,7 +91,6 @@ WORKDIR /app
|
||||
|
||||
# Install runtime dependencies only
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
postgresql-client \
|
||||
curl \
|
||||
ca-certificates \
|
||||
tini \
|
||||
|
||||
Reference in New Issue
Block a user