25 lines
609 B
Docker
25 lines
609 B
Docker
FROM python:3.13-slim
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements-dev.txt .
|
|
RUN pip install --no-cache-dir -r requirements-dev.txt
|
|
|
|
RUN useradd --create-home --shell /bin/bash appuser
|
|
|
|
COPY app/ app/
|
|
|
|
COPY alembic.ini .
|
|
COPY alembic/ alembic/
|
|
RUN chown -R appuser:appuser /app/alembic
|
|
|
|
USER appuser
|
|
|
|
EXPOSE 8080
|
|
|
|
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=3 \
|
|
CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8080/health/live')" || exit 1
|
|
|
|
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080", "--timeout-graceful-shutdown", "10", "--reload"]
|
|
|