Bite the bullet and remove heredoc.
This commit is contained in:
parent
415b47ad59
commit
328c8f59d2
1 changed files with 6 additions and 9 deletions
15
Dockerfile
15
Dockerfile
|
@ -20,25 +20,22 @@ WORKDIR /app
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||||
--mount=type=bind,source=uv.lock,target=uv.lock \
|
--mount=type=bind,source=uv.lock,target=uv.lock \
|
||||||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml <<EOF
|
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
||||||
mkdir -p /app/src/staticfiles
|
mkdir -p /app/src/staticfiles & \
|
||||||
apk update
|
apk update & \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
binutils \
|
binutils \
|
||||||
libpq-dev \
|
libpq-dev \
|
||||||
gettext \
|
gettext \
|
||||||
netcat-openbsd \
|
netcat-openbsd \
|
||||||
postgresql-client
|
postgresql-client & \
|
||||||
# run uv sync --no-dev if $DJANGO_ENV is production, otherwise run uv sync
|
# 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
|
if [ "$DJANGO_ENV" = "production" ]; then uv sync --frozen --no-install-project --no-dev; else uv sync --frozen --no-install-project; fi
|
||||||
EOF
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
ENV PATH="/venv/bin:$PATH"
|
ENV PATH="/venv/bin:$PATH"
|
||||||
RUN <<EOF
|
RUN ./src/manage.py compilemessages & \
|
||||||
./src/manage.py compilemessages
|
./src/manage.py collectstatic --noinput
|
||||||
./src/manage.py collectstatic --noinput
|
|
||||||
EOF
|
|
||||||
|
|
||||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue