sass-imobiliaria/backend/Dockerfile

25 lines
473 B
Docker

FROM python:3.12-slim
# Install system deps needed by psycopg2-binary
RUN apt-get update && apt-get install -y --no-install-recommends \
libpq-dev \
&& rm -rf /var/lib/apt/lists/*
# Install uv
RUN pip install --no-cache-dir uv
WORKDIR /app
# Install Python deps first (layer cache)
COPY pyproject.toml .
RUN uv sync --no-dev
# Copy application code
COPY . .
# Make entrypoint executable
RUN chmod +x entrypoint.sh
EXPOSE 5000
ENTRYPOINT ["./entrypoint.sh"]