fix docker

This commit is contained in:
Gal 2025-07-16 00:18:30 +02:00
parent b231733dfb
commit ce7461dc67
Signed by: gal
GPG Key ID: F035BC65003BC00B
1 changed files with 10 additions and 10 deletions

View File

@ -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