You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iTi-Flask/copier-template/Dockerfile.jinja

25 lines
518 B
Django/Jinja

FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
UV_LINK_MODE=copy \
UV_COMPILE_BYTECODE=1
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl git \
&& rm -rf /var/lib/apt/lists/*
COPY . .
RUN pip install --no-cache-dir uv \
&& if [ -f uv.lock ]; then \
uv sync --frozen --no-dev; \
else \
uv sync --no-dev; \
fi
EXPOSE 8000
CMD ["uv", "run", "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]