fix: اصلاح Dockerfile و Helm برای رفع مشکل 404
Some checks failed
CD - Build & Deploy / release (push) Has been cancelled
CD - Build & Deploy / build-and-push (push) Has been cancelled
CD - Build & Deploy / package-helm (push) Has been cancelled
ci/woodpecker/push/woodpecker Pipeline failed
CD - Build & Deploy / deploy-staging (push) Has been cancelled
CD - Build & Deploy / deploy-production (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
CD - Build & Deploy / release (push) Has been cancelled
CD - Build & Deploy / build-and-push (push) Has been cancelled
CD - Build & Deploy / package-helm (push) Has been cancelled
ci/woodpecker/push/woodpecker Pipeline failed
CD - Build & Deploy / deploy-staging (push) Has been cancelled
CD - Build & Deploy / deploy-production (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
- حذف reflex init که فایلها را overwrite میکرد - نگه داشتن .web directory برای frontend static files - اصلاح service targetPort از hardcode به values - افزایش readiness/liveness probe timing به 120 ثانیه - اصلاح export برای production mode
This commit is contained in:
11
Dockerfile
11
Dockerfile
@@ -51,11 +51,12 @@ RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
|
||||
# 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
|
||||
# Build and export Reflex app for production
|
||||
# Export creates .web directory with frontend static files
|
||||
RUN python -m reflex export --no-zip
|
||||
|
||||
# Aggressive cleanup to reduce layer size
|
||||
# NOTE: Keep .web directory - it contains frontend static files needed for --backend-only mode
|
||||
RUN set -ex && \
|
||||
# Remove Python cache
|
||||
find /build -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true && \
|
||||
@@ -65,8 +66,8 @@ RUN set -ex && \
|
||||
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 node_modules but KEEP .web (frontend static files)
|
||||
rm -rf /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
|
||||
|
||||
Reference in New Issue
Block a user