Bite the bullet and remove heredoc.

This commit is contained in:
Víðir Valberg Guðmundsson 2025-03-21 21:56:09 +01:00
parent 415b47ad59
commit 328c8f59d2

View file

@ -20,25 +20,22 @@ WORKDIR /app
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml <<EOF
mkdir -p /app/src/staticfiles
apk update
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
mkdir -p /app/src/staticfiles & \
apk update & \
apk add --no-cache \
binutils \
libpq-dev \
gettext \
netcat-openbsd \
postgresql-client
postgresql-client & \
# run uv sync --no-dev if $DJANGO_ENV is production, otherwise run uv sync
if [ "$DJANGO_ENV" = "production" ]; then uv sync --frozen --no-install-project --no-dev; else uv sync --frozen --no-install-project; fi
EOF
COPY . .
ENV PATH="/venv/bin:$PATH"
RUN <<EOF
./src/manage.py compilemessages
./src/manage.py collectstatic --noinput
EOF
RUN ./src/manage.py compilemessages & \
./src/manage.py collectstatic --noinput
ENTRYPOINT ["/app/entrypoint.sh"]