♻️(project) rename project from "publish" to "impress"

The repository was renamed to "impress" but the code was still
mentionning "publish".
This commit is contained in:
Samuel Paccoud - DINUM
2024-03-07 19:46:46 +01:00
committed by Samuel Paccoud
parent f581eb8abd
commit ab7d9933e0
42 changed files with 119 additions and 119 deletions

View File

@@ -1,4 +1,4 @@
# Django publish
# Django impress
# ---- base image to inherit from ----
FROM python:3.10-slim-bookworm as base
@@ -38,7 +38,7 @@ RUN yarn install --frozen-lockfile && \
# ---- static link collector ----
FROM base as link-collector
ARG publish_STATIC_ROOT=/data/static
ARG IMPRESS_STATIC_ROOT=/data/static
# Install rdfind
RUN apt-get update && \
@@ -49,7 +49,7 @@ RUN apt-get update && \
# Copy installed python dependencies
COPY --from=back-builder /install /usr/local
# Copy publish application (see .dockerignore)
# Copy impress application (see .dockerignore)
COPY ./src/backend /app/
WORKDIR /app
@@ -60,7 +60,7 @@ RUN DJANGO_CONFIGURATION=Build \
# Replace duplicated file by a symlink to decrease the overall size of the
# final image
RUN rdfind -makesymlinks true -followsymlinks true -makeresultsfile false ${publish_STATIC_ROOT}
RUN rdfind -makesymlinks true -followsymlinks true -makeresultsfile false ${IMPRESS_STATIC_ROOT}
# ---- Core application image ----
FROM base as core
@@ -78,7 +78,7 @@ RUN chmod g=u /etc/passwd
# Copy installed python dependencies
COPY --from=back-builder /install /usr/local
# Copy publish application (see .dockerignore)
# Copy impress application (see .dockerignore)
COPY ./src/backend /app/
WORKDIR /app
@@ -99,9 +99,9 @@ RUN apt-get update && \
apt-get install -y postgresql-client && \
rm -rf /var/lib/apt/lists/*
# Uninstall publish and re-install it in editable mode along with development
# Uninstall impress and re-install it in editable mode along with development
# dependencies
RUN pip uninstall -y publish
RUN pip uninstall -y impress
RUN pip install -e .[dev]
# Restore the un-privileged user running the application
@@ -119,21 +119,21 @@ CMD python manage.py runserver 0.0.0.0:8000
# ---- Production image ----
FROM core as production
ARG publish_STATIC_ROOT=/data/static
ARG IMPRESS_STATIC_ROOT=/data/static
# Gunicorn
RUN mkdir -p /usr/local/etc/gunicorn
COPY docker/files/usr/local/etc/gunicorn/publish.py /usr/local/etc/gunicorn/publish.py
COPY docker/files/usr/local/etc/gunicorn/impress.py /usr/local/etc/gunicorn/impress.py
# Un-privileged user running the application
ARG DOCKER_USER
USER ${DOCKER_USER}
# Copy statics
COPY --from=link-collector ${publish_STATIC_ROOT} ${publish_STATIC_ROOT}
COPY --from=link-collector ${IMPRESS_STATIC_ROOT} ${IMPRESS_STATIC_ROOT}
# Copy publish mails
# Copy impress mails
COPY --from=mail-builder /mail/backend/core/templates/mail /app/core/templates/mail
# The default command runs gunicorn WSGI server in publish's main module
CMD gunicorn -c /usr/local/etc/gunicorn/publish.py publish.wsgi:application
# The default command runs gunicorn WSGI server in impress's main module
CMD gunicorn -c /usr/local/etc/gunicorn/impress.py impress.wsgi:application