● Zion Boggan
repos/Sightline/backend/Dockerfile
zionboggan.com ↗
19 lines · text
History for this file →
1
FROM python:3.11-slim
2
 
3
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
4
 
5
WORKDIR /app
6
 
7
RUN apt-get update && apt-get install -y --no-install-recommends \
8
    build-essential libpq-dev curl && rm -rf /var/lib/apt/lists/*
9
 
10
COPY requirements.txt .
11
RUN pip install --no-cache-dir -r requirements.txt
12
 
13
COPY . .
14
 
15
EXPOSE 8000
16
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
17
    CMD curl -fsS http://localhost:8000/health || exit 1
18
 
19
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]