Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix prod docker image #2618

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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