fix: update deployment scripts and resolve backend API communication issue

This commit is contained in:
dido committed 2026-09-14 15:52:11 +03:00
1 parent ae023525ec
commit 441560a910
14 files changed
+61 -66

No files matched your search

+3 -8
View File
@@ -44,8 +44,7 @@ RUN set -eux; \
find /opt/venv -path '*/site-packages/pip*' -print0 | xargs -0 -r rm -rf || true; \
find /opt/venv -path '*/site-packages/setuptools*' -print0 | xargs -0 -r rm -rf || true; \
find /opt/venv -path '*/site-packages/wheel*' -print0 | xargs -0 -r rm -rf || true; \
# Remove static metadata not required for runtime (careful: keep runtime metadata intact)
find /opt/venv -type d -name '*.dist-info' -prune -print0 | xargs -0 -r rm -rf || true || true
true
# Download Caddy binary for the build target (multi-arch aware)
ARG TARGETARCH
@@ -108,12 +107,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
COPY --from=builder /opt/venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"
# Reinstall runtime dependencies explicitly in the final image to avoid missing package metadata
COPY requirements.txt /tmp/requirements.txt
RUN /opt/venv/bin/python -m ensurepip --upgrade && /opt/venv/bin/python -m pip install --no-cache-dir --prefer-binary -r /tmp/requirements.txt && rm -f /tmp/requirements.txt
# Security: Run as non-root user
RUN groupadd -r strixwebssh && useradd -r -g strixwebssh strixwebssh
RUN groupadd -r webssh && useradd -r -g webssh webssh
WORKDIR /app/src
@@ -122,7 +117,7 @@ COPY src/ /app/src/
COPY deployment/docker-entrypoint.sh /usr/local/bin/
# Create .ssh directory for host keys
RUN mkdir -p /app/src/.ssh && chown -R strixwebssh:strixwebssh /app/src
RUN mkdir -p /app/src/.ssh && chown -R webssh:webssh /app/src
# Copy entrypoint
RUN chmod +x /usr/local/bin/docker-entrypoint.sh