Skip to content

Commit

Permalink
Fix prod docker image (#2618)
Browse files Browse the repository at this point in the history
  • Loading branch information
sainak authored Nov 26, 2024
1 parent f0f0c8b commit f217f3a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 7 additions & 4 deletions docker/prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ ENV PATH=$APP_HOME/.venv/bin:$PATH
# ---
FROM base AS builder

RUN addgroup --system django \
&& adduser --system --ingroup django django

RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential libjpeg-dev zlib1g-dev libgmp-dev libpq-dev git wget \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
Expand Down Expand Up @@ -59,11 +56,16 @@ RUN python3 $APP_HOME/install_plugins.py
# ---
FROM base AS runtime

RUN addgroup --system django \
&& adduser --system --ingroup django django

RUN apt-get update && apt-get install --no-install-recommends -y \
libpq-dev libgmp-dev gettext wget curl gnupg \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& rm -rf /var/lib/apt/lists/*

RUN chown django:django $APP_HOME

COPY --from=builder --chmod=0755 /usr/local/bin/typst /usr/local/bin/typst

COPY --from=builder --chown=django:django $APP_HOME/.venv $APP_HOME/.venv
Expand All @@ -75,9 +77,10 @@ COPY --chown=django:django . $APP_HOME
USER django

HEALTHCHECK \
--start-period=20s \
--start-interval=1s \
--interval=30s \
--timeout=5s \
--start-period=10s \
--retries=12 \
CMD ["./healthcheck.sh"]

Expand Down
1 change: 0 additions & 1 deletion scripts/celery_beat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ set -euo pipefail
python manage.py migrate --noinput
python manage.py compilemessages -v 0
python manage.py load_redis_index
python manage.py load_event_types

touch /tmp/healthy

Expand Down

0 comments on commit f217f3a

Please sign in to comment.