From ce7461dc6748eeefc6636fb0e1f7146e723eff7f Mon Sep 17 00:00:00 2001 From: Gal Date: Wed, 16 Jul 2025 00:18:30 +0200 Subject: [PATCH] fix docker --- backend/Dockerfile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 0add9db..7db75a0 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -18,21 +18,21 @@ RUN apt-get update && apt-get install -y \ # Install UV for faster Python package management RUN pip install uv -# Create non-root user early -RUN useradd --create-home --shell /bin/bash app && \ - chown -R app:app /app - -# Switch to app user -USER app - # Copy pyproject.toml and uv.lock -COPY --chown=app:app pyproject.toml uv.lock ./ +COPY pyproject.toml uv.lock ./ -# Install Python dependencies as app user +# Install Python dependencies RUN uv sync --frozen --no-dev # Copy application code -COPY --chown=app:app . . +COPY . . + +# Create non-root user and fix permissions +RUN useradd --create-home --shell /bin/bash app && \ + chown -R app:app /app && \ + chmod -R 755 /app + +USER app # Expose port EXPOSE 8000