You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
1.1 KiB
26 lines
1.1 KiB
FROM python:3.13-slim |
|
COPY --from=ghcr.io/astral-sh/uv:0.10.9 /uv /usr/local/bin/uv |
|
RUN apt-get update \ |
|
&& apt-get install -y --no-install-recommends ca-certificates curl \ |
|
&& install -d /usr/share/postgresql-common/pgdg \ |
|
&& curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc \ |
|
-o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc \ |
|
&& . /etc/os-release \ |
|
&& echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt ${VERSION_CODENAME}-pgdg main" \ |
|
> /etc/apt/sources.list.d/pgdg.list \ |
|
&& apt-get update \ |
|
&& apt-get install -y --no-install-recommends postgresql-client-17 \ |
|
&& rm -rf /var/lib/apt/lists/* |
|
WORKDIR /app |
|
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 PATH="/app/.venv/bin:$PATH" |
|
COPY pyproject.toml uv.lock ./ |
|
RUN uv sync --frozen --no-install-project |
|
COPY config ./config |
|
COPY core ./core |
|
COPY finance ./finance |
|
COPY ingestion ./ingestion |
|
COPY tests ./tests |
|
COPY manage.py ./ |
|
RUN useradd --uid 10001 --create-home app |
|
USER app |
|
CMD ["python", "manage.py", "runserver", "0.0.0.0:8000", "--noreload"]
|
|
|