fixed things

This commit is contained in:
2025-08-02 16:20:23 -04:00
parent 3f2f14ac66
commit c9f25ea149
17 changed files with 231 additions and 20 deletions

28
docker/Dockerfile.backend Normal file
View File

@@ -0,0 +1,28 @@
FROM python:3.12-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
curl \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python dependencies
COPY requirements-backend.txt .
RUN pip install --no-cache-dir -r requirements-backend.txt
# Copy source code
COPY src/ ./src/
# Create non-root user
RUN useradd -m -u 1000 jobforge && chown -R jobforge:jobforge /app
USER jobforge
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8000/health || exit 1
EXPOSE 8000
CMD ["uvicorn", "src.backend.main:app", "--host", "0.0.0.0", "--port", "8000"]