From 4573e6ab137beb4d26e1b4f3b31a006b89688853 Mon Sep 17 00:00:00 2001 From: nataliaweni Date: Fri, 27 Oct 2023 18:13:52 -0300 Subject: [PATCH 1/7] Test PR changes --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 0c5c7bf1..7c0e40d4 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -90,7 +90,7 @@ RUN apt-get update \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# copy project + COPY --chown=app_user:app_group . . RUN chmod 777 docker-entrypoint.sh From cf7da967798c67d1dc5fbdb11c5dbf21eb900f93 Mon Sep 17 00:00:00 2001 From: nataliaweni Date: Fri, 10 Nov 2023 18:45:16 -0300 Subject: [PATCH 2/7] Modify dockerfile --- docker-entrypoint.sh | 49 ++++++++++++++++++++ docker/Dockerfile | 103 +++++++++++++++++++++++++++++++------------ 2 files changed, 123 insertions(+), 29 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 05d37e65..d736846a 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -5,3 +5,52 @@ python manage.py collectstatic --noinput echo "Starting server" exec gunicorn chats.asgi -c gunicorn.conf.py + +do_gosu(){ + user="$1" + shift 1 + + is_exec="false" + if [ "$1" = "exec" ]; then + is_exec="true" + shift 1 + fi + + if [ "$(id -u)" = "0" ]; then + if [ "${is_exec}" = "true" ]; then + exec gosu "${user}" "$@" + else + gosu "${user}" "$@" + return "$?" + fi + else + if [ "${is_exec}" = "true" ]; then + exec "$@" + else + eval '"$@"' + return "$?" + fi + fi +} + + +if [[ "start" == "$1" ]]; then + do_gosu "${APP_USER}:${APP_GROUP}" exec gunicorn "${GUNICORN_APP}" \ + --name="${APP_NAME}" \ + --chdir="${APP_PATH}" \ + --bind=0.0.0.0:8080 \ + --log-config="${GUNICORN_LOG_CONF}" \ + -c "${GUNICORN_CONF}" +elif [[ "celery-worker" == "$1" ]]; then + celery_queue="celery" + if [ "${2}" ] ; then + celery_queue="${2}" + fi + do_gosu "${APP_USER}:${APP_GROUP}" exec celery \ + -A "${CELERY_APP}" --workdir="${APP_PATH}" worker \ + -Q "${celery_queue}" \ + -O fair \ + -l "${LOG_LEVEL}" \ + --autoscale=4,1 +if +exec "$@" \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile index 7c0e40d4..511ebb98 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,7 +1,9 @@ -FROM python:3.8-slim-buster AS base +# syntax = docker/dockerfile:1 -ARG APP_UID=1000 -ARG APP_GID=1000 +ARG PYTHON_VERSION="3.8" +ARG DEBIAN_VERSION="buster" +ARG POETRY_VERSION="1.1.15" +ARG REQUESTS_VERSION="2.29.0" ARG BUILD_DEPS="\ python3-dev \ @@ -23,17 +25,16 @@ ARG RUNTIME_DEPS="\ ffmpeg \ libmagic1" +FROM python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} AS base + ARG APP_PORT="8000" ARG APP_VERSION="0.1" -# set environment variables -ENV PROJECT_PATH="/chats" - -ENV APPLICATION_NAME="Chats" - -ENV APP_VERSION=${APP_VERSION} \ +ENV APPLICATION_NAME="Chats" \ + APP_VERSION=${APP_VERSION} \ RUNTIME_DEPS=${RUNTIME_DEPS} \ + PROJECT_PATH="/chats" \ BUILD_DEPS=${BUILD_DEPS} \ APP_UID=${APP_UID} \ APP_GID=${APP_GID} \ @@ -46,10 +47,17 @@ ENV APP_VERSION=${APP_VERSION} \ LABEL app=${VERSION} \ os="debian" \ - os.version="10" \ + os.version="12" \ name="${APPLICATION_NAME} ${APP_VERSION}" \ description="${APPLICATION_NAME} image" \ - maintainer="${APPLICATION_NAME} Team" + maintainer="${APPLICATION_NAME} Team" \ + org.opencontainers.image.url="https://github.com/weni-ai/chats-engine" \ + org.opencontainers.image.documentation="https://github.com/weni-ai/chats-engine" \ + org.opencontainers.image.source="https://github.com/weni-ai/chats-engine" \ + org.opencontainers.image.title="Chats" + +ARG APP_UID=1000 +ARG APP_GID=1000 RUN addgroup --gid "${APP_GID}" app_group \ && useradd --system -m -d ${PROJECT_PATH} -u "${APP_UID}" -g "${APP_GID}" app_user @@ -57,42 +65,79 @@ RUN addgroup --gid "${APP_GID}" app_group \ # set work directory WORKDIR ${PROJECT_PATH} -FROM base AS build +RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache + +# RUN if [ ! "x${BUILD_DEPS}" = "x" ] ; then apt-get update \ +# && apt-get install -y --no-install-recommends ${BUILD_DEPS} ; fi -RUN if [ ! "x${BUILD_DEPS}" = "x" ] ; then apt-get update \ - && apt-get install -y --no-install-recommends ${BUILD_DEPS} ; fi +FROM base AS build-poetry -FROM build as build-poetry +ARG POETRY_VERSION +ARG REQUESTS_VERSION +ARG NODE_VERSION COPY ./pyproject.toml . COPY ./poetry.lock . -RUN python -m pip install -U poetry \ - && poetry export --without-hashes --output /requirements.txt +RUN --mount=type=cache,mode=0755,target=/pip_cache,id=pip pip install --cache-dir /pip_cache -U poetry=="${POETRY_VERSION}" \ + && poetry cache clear -n --all pypi \ + && pip install --cache-dir /pip_cache requests=="${REQUESTS_VERSION}" \ + && poetry export --without-hashes --output requirements.txt +# && poetry add -n --lock $(cat pip-requires.txt) \ FROM build as build-pip +ARG BUILD_DEPS + +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y ${BUILD_DEPS} + COPY --from=build-poetry /requirements.txt . -RUN mkdir /install \ - && pip install --no-cache-dir --prefix=/install -r requirements.txt +RUN --mount=type=cache,mode=0755,target=/pip_cache,id=pip pip install --cache-dir /pip_cache --prefix=/install -r /tmp/dep/requirements.txt + +# RUN mkdir /install \ +# && pip install --no-cache-dir --prefix=/install -r requirements.txt FROM base -COPY --from=build-pip /install /usr/local +ARG BUILD_DEPS +ARG RUNTIME_DEPS -# Clear image and install runtime dependences -RUN apt-get update \ - && SUDO_FORCE_REMOVE=yes apt-get remove --purge -y ${BUILD_DEPS} \ - && apt-get autoremove -y \ - && apt-get install -y --no-install-recommends ${RUNTIME_DEPS} \ - && rm -rf /usr/share/man \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + apt-get update \ + && SUDO_FORCE_REMOVE=yes apt-get remove --purge -y ${BUILD_DEPS} \ + && apt-get autoremove -y \ + && apt-get install -y --no-install-recommends ${RUNTIME_DEPS} \ + && rm -rf /usr/share/man /usr/share/doc +# COPY --chown=${PROJECT_USER}:${PROJECT_GROUP} package.json package-lock.json ${PROJECT_PATH} -COPY --chown=app_user:app_group . . +COPY --from=build-pip /install /usr/local +# # Clear image and install runtime dependences +# RUN apt-get update \ +# && SUDO_FORCE_REMOVE=yes apt-get remove --purge -y ${BUILD_DEPS} \ +# && apt-get autoremove -y \ +# && apt-get install -y --no-install-recommends ${RUNTIME_DEPS} \ +# && rm -rf /usr/share/man \ +# && apt-get clean \ +# && rm -rf /var/lib/apt/lists/* + +RUN --mount=type=cache,id=npm,target=/npm_cache \ + npm install --global --ignore-scripts --cache /npm_cache \ + coffeescript \ + less \ + yarn \ + && npm install --ignore-scripts --cache /npm_cache + +COPY --from=build /install /usr/local +COPY --chown=${PROJECT_USER}:${PROJECT_GROUP} . ${PROJECT_PATH} + +USER "${PROJECT_USER}:${PROJECT_USER}" RUN chmod 777 docker-entrypoint.sh CMD ["sh", "docker-entrypoint.sh"] From c76741b783b15bfb28702bd59f6754ec6faa8dcf Mon Sep 17 00:00:00 2001 From: nataliaweni Date: Thu, 14 Dec 2023 18:26:14 -0300 Subject: [PATCH 3/7] Fix dockerfile and docker-entrypoint --- docker-entrypoint.sh | 31 +++++++++++++++++-- docker/Dockerfile | 72 +++++++++++++++++++------------------------- 2 files changed, 59 insertions(+), 44 deletions(-) diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index d736846a..fb69205c 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,5 +1,15 @@ #!/bin/bash +export GUNICORN_APP=${GUNICORN_APP:-"app.wsgi:application"} +export CELERY_APP=${CELERY_APP:-"app.wsgi:celery"} +export GUNICORN_LOG_CONF=${GUNICORN_LOG_CONF:-"${PROJECT_PATH}/docker/gunicorn/gunicorn-logging.conf"} +export GUNICORN_CONF=${GUNICORN_CONF:-"${PROJECT_PATH}/docker/gunicorn/gunicorn.conf.py"} +export LOG_LEVEL=${LOG_LEVEL:-"INFO"} +#export GUNICORN_CONF=${GUNICORN_CONF:-"python:app.gunicorn" +export CELERY_MAX_WORKERS=${CELERY_MAX_WORKERS:-'4'} +export CELERY_BEAT_DATABASE_FILE=${CELERY_BEAT_DATABASE_FILE:-'/tmp/celery_beat_database'} +export HEALTHCHECK_TIMEOUT=${HEALTHCHECK_TIMEOUT:-"10"} + echo "Running collectstatic" python manage.py collectstatic --noinput @@ -37,7 +47,7 @@ do_gosu(){ if [[ "start" == "$1" ]]; then do_gosu "${APP_USER}:${APP_GROUP}" exec gunicorn "${GUNICORN_APP}" \ --name="${APP_NAME}" \ - --chdir="${APP_PATH}" \ + --chdir="${PROJECT_PATH}" \ --bind=0.0.0.0:8080 \ --log-config="${GUNICORN_LOG_CONF}" \ -c "${GUNICORN_CONF}" @@ -52,5 +62,20 @@ elif [[ "celery-worker" == "$1" ]]; then -O fair \ -l "${LOG_LEVEL}" \ --autoscale=4,1 -if -exec "$@" \ No newline at end of file +elif [[ "healthcheck-celery-worker" == "$1" ]]; then + celery_queue="celery" + if [ "${2}" ] ; then + celery_queue="${2}" + fi + HEALTHCHECK_OUT=$( + do_gosu "${APP_USER}:${APP_GROUP}" celery -A "${CELERY_APP}" \ + inspect ping \ + -d "${celery_queue}@${HOSTNAME}" \ + --timeout "${HEALTHCHECK_TIMEOUT}" 2>&1 + ) + echo "${HEALTHCHECK_OUT}" + grep -F -qs "${celery_queue}@${HOSTNAME}: OK" <<< "${HEALTHCHECK_OUT}" || exit 1 + exit 0 +fi + +exec "$@" diff --git a/docker/Dockerfile b/docker/Dockerfile index 511ebb98..0e36a84c 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -5,6 +5,9 @@ ARG DEBIAN_VERSION="buster" ARG POETRY_VERSION="1.1.15" ARG REQUESTS_VERSION="2.29.0" +ARG APP_UID=1999 +ARG APP_GID=1999 + ARG BUILD_DEPS="\ python3-dev \ build-essential \ @@ -25,17 +28,22 @@ ARG RUNTIME_DEPS="\ ffmpeg \ libmagic1" -FROM python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} AS base +FROM python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} as base -ARG APP_PORT="8000" +ARG POETRY_VERSION +ARG REQUESTS_VERSION +ARG APP_PORT="8000" ARG APP_VERSION="0.1" -ENV APPLICATION_NAME="Chats" \ - APP_VERSION=${APP_VERSION} \ +# set environment variables +ENV APP_VERSION=${APP_VERSION} \ RUNTIME_DEPS=${RUNTIME_DEPS} \ - PROJECT_PATH="/chats" \ BUILD_DEPS=${BUILD_DEPS} \ + APPLICATION_NAME="Chats" \ + PROJECT_PATH=/chats \ + PROJECT_USER=app_user \ + PROJECT_GROUP=app_group \ APP_UID=${APP_UID} \ APP_GID=${APP_GID} \ PYTHONDONTWRITEBYTECODE=1 \ @@ -47,56 +55,43 @@ ENV APPLICATION_NAME="Chats" \ LABEL app=${VERSION} \ os="debian" \ - os.version="12" \ + os.version="10" \ name="${APPLICATION_NAME} ${APP_VERSION}" \ description="${APPLICATION_NAME} image" \ - maintainer="${APPLICATION_NAME} Team" \ - org.opencontainers.image.url="https://github.com/weni-ai/chats-engine" \ - org.opencontainers.image.documentation="https://github.com/weni-ai/chats-engine" \ - org.opencontainers.image.source="https://github.com/weni-ai/chats-engine" \ - org.opencontainers.image.title="Chats" - -ARG APP_UID=1000 -ARG APP_GID=1000 + maintainer="${APPLICATION_NAME} Team" -RUN addgroup --gid "${APP_GID}" app_group \ - && useradd --system -m -d ${PROJECT_PATH} -u "${APP_UID}" -g "${APP_GID}" app_user +RUN addgroup --gid "${APP_GID}" "${PROJECT_GROUP}" \ + && useradd --system -m -d ${PROJECT_PATH} -u "${APP_UID}" -g "${APP_GID}" "${PROJECT_USER}" # set work directory WORKDIR ${PROJECT_PATH} RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache +# FROM base AS build + # RUN if [ ! "x${BUILD_DEPS}" = "x" ] ; then apt-get update \ # && apt-get install -y --no-install-recommends ${BUILD_DEPS} ; fi -FROM base AS build-poetry +FROM build as build-poetry ARG POETRY_VERSION ARG REQUESTS_VERSION -ARG NODE_VERSION COPY ./pyproject.toml . COPY ./poetry.lock . +# RUN python -m pip install -U poetry \ +# && poetry export --without-hashes --output /requirements.txt + RUN --mount=type=cache,mode=0755,target=/pip_cache,id=pip pip install --cache-dir /pip_cache -U poetry=="${POETRY_VERSION}" \ && poetry cache clear -n --all pypi \ && pip install --cache-dir /pip_cache requests=="${REQUESTS_VERSION}" \ && poetry export --without-hashes --output requirements.txt -# && poetry add -n --lock $(cat pip-requires.txt) \ -FROM build as build-pip +# FROM build as build-pip -ARG BUILD_DEPS - -RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y ${BUILD_DEPS} - -COPY --from=build-poetry /requirements.txt . - -RUN --mount=type=cache,mode=0755,target=/pip_cache,id=pip pip install --cache-dir /pip_cache --prefix=/install -r /tmp/dep/requirements.txt +# COPY --from=build-poetry /requirements.txt . # RUN mkdir /install \ # && pip install --no-cache-dir --prefix=/install -r requirements.txt @@ -112,13 +107,15 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ && SUDO_FORCE_REMOVE=yes apt-get remove --purge -y ${BUILD_DEPS} \ && apt-get autoremove -y \ && apt-get install -y --no-install-recommends ${RUNTIME_DEPS} \ - && rm -rf /usr/share/man /usr/share/doc + && rm -rf /usr/share/man /usr/share/doc \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* -# COPY --chown=${PROJECT_USER}:${PROJECT_GROUP} package.json package-lock.json ${PROJECT_PATH} +COPY --chown=${PROJECT_USER}:${PROJECT_GROUP} package.json package-lock.json ${PROJECT_PATH} COPY --from=build-pip /install /usr/local -# # Clear image and install runtime dependences +# Clear image and install runtime dependences # RUN apt-get update \ # && SUDO_FORCE_REMOVE=yes apt-get remove --purge -y ${BUILD_DEPS} \ # && apt-get autoremove -y \ @@ -127,14 +124,7 @@ COPY --from=build-pip /install /usr/local # && apt-get clean \ # && rm -rf /var/lib/apt/lists/* -RUN --mount=type=cache,id=npm,target=/npm_cache \ - npm install --global --ignore-scripts --cache /npm_cache \ - coffeescript \ - less \ - yarn \ - && npm install --ignore-scripts --cache /npm_cache - -COPY --from=build /install /usr/local +# copy project COPY --chown=${PROJECT_USER}:${PROJECT_GROUP} . ${PROJECT_PATH} USER "${PROJECT_USER}:${PROJECT_USER}" From f4bb5472c0ab17cd0fb9b20738ea20b9f92783db Mon Sep 17 00:00:00 2001 From: nataliaweni Date: Thu, 14 Dec 2023 20:44:10 -0300 Subject: [PATCH 4/7] Remove REQUESTS_VERSION from dockerfile --- docker/Dockerfile | 68 +++++++++++++++-------------------------------- 1 file changed, 22 insertions(+), 46 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 0e36a84c..ba6cbba7 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,12 +1,7 @@ # syntax = docker/dockerfile:1 -ARG PYTHON_VERSION="3.8" -ARG DEBIAN_VERSION="buster" +ARG PYTHON_VERSION="3.9" ARG POETRY_VERSION="1.1.15" -ARG REQUESTS_VERSION="2.29.0" - -ARG APP_UID=1999 -ARG APP_GID=1999 ARG BUILD_DEPS="\ python3-dev \ @@ -28,10 +23,9 @@ ARG RUNTIME_DEPS="\ ffmpeg \ libmagic1" -FROM python:${PYTHON_VERSION}-slim-${DEBIAN_VERSION} as base +FROM python:${PYTHON_VERSION}-slim as base ARG POETRY_VERSION -ARG REQUESTS_VERSION ARG APP_PORT="8000" ARG APP_VERSION="0.1" @@ -44,8 +38,6 @@ ENV APP_VERSION=${APP_VERSION} \ PROJECT_PATH=/chats \ PROJECT_USER=app_user \ PROJECT_GROUP=app_group \ - APP_UID=${APP_UID} \ - APP_GID=${APP_GID} \ PYTHONDONTWRITEBYTECODE=1 \ PYTHONUNBUFFERED=1 \ PYTHONIOENCODING=UTF-8 \ @@ -60,41 +52,35 @@ LABEL app=${VERSION} \ description="${APPLICATION_NAME} image" \ maintainer="${APPLICATION_NAME} Team" -RUN addgroup --gid "${APP_GID}" "${PROJECT_GROUP}" \ - && useradd --system -m -d ${PROJECT_PATH} -u "${APP_UID}" -g "${APP_GID}" "${PROJECT_USER}" +RUN addgroup --gid 1999 "${PROJECT_GROUP}" \ + && useradd --system -m -d ${PROJECT_PATH} -u 1999 -g 1999 "${PROJECT_USER}" # set work directory WORKDIR ${PROJECT_PATH} RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache -# FROM base AS build - -# RUN if [ ! "x${BUILD_DEPS}" = "x" ] ; then apt-get update \ -# && apt-get install -y --no-install-recommends ${BUILD_DEPS} ; fi - -FROM build as build-poetry +FROM base as build-poetry ARG POETRY_VERSION -ARG REQUESTS_VERSION -COPY ./pyproject.toml . -COPY ./poetry.lock . - -# RUN python -m pip install -U poetry \ -# && poetry export --without-hashes --output /requirements.txt +COPY pyproject.toml poetry.lock ./ RUN --mount=type=cache,mode=0755,target=/pip_cache,id=pip pip install --cache-dir /pip_cache -U poetry=="${POETRY_VERSION}" \ && poetry cache clear -n --all pypi \ - && pip install --cache-dir /pip_cache requests=="${REQUESTS_VERSION}" \ && poetry export --without-hashes --output requirements.txt -# FROM build as build-pip +FROM base as build -# COPY --from=build-poetry /requirements.txt . +ARG BUILD_DEPS -# RUN mkdir /install \ -# && pip install --no-cache-dir --prefix=/install -r requirements.txt +RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ + --mount=type=cache,target=/var/lib/apt,sharing=locked \ + apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y ${BUILD_DEPS} + +COPY --from=build-poetry "${PROJECT_PATH}/requirements.txt" /tmp/dep/ +RUN --mount=type=cache,mode=0755,target=/pip_cache,id=pip pip install --cache-dir /pip_cache --prefix=/install -r /tmp/dep/requirements.txt FROM base @@ -111,24 +97,14 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -COPY --chown=${PROJECT_USER}:${PROJECT_GROUP} package.json package-lock.json ${PROJECT_PATH} - -COPY --from=build-pip /install /usr/local - -# Clear image and install runtime dependences -# RUN apt-get update \ -# && SUDO_FORCE_REMOVE=yes apt-get remove --purge -y ${BUILD_DEPS} \ -# && apt-get autoremove -y \ -# && apt-get install -y --no-install-recommends ${RUNTIME_DEPS} \ -# && rm -rf /usr/share/man \ -# && apt-get clean \ -# && rm -rf /var/lib/apt/lists/* - -# copy project +COPY --from=build /install /usr/local COPY --chown=${PROJECT_USER}:${PROJECT_GROUP} . ${PROJECT_PATH} USER "${PROJECT_USER}:${PROJECT_USER}" -RUN chmod 777 docker-entrypoint.sh -CMD ["sh", "docker-entrypoint.sh"] -#ENTRYPOINT ["docker-entrypoint.sh"] +EXPOSE 8000 + +ENTRYPOINT ["bash", "./entrypoint.sh"] +CMD ["start"] +# CMD ["sh", "docker-entrypoint.sh"] +# #ENTRYPOINT ["docker-entrypoint.sh"] From 01933e56e5d4bc73b621e534b5dc325c570b7ad1 Mon Sep 17 00:00:00 2001 From: nataliaweni Date: Fri, 15 Dec 2023 04:05:41 -0300 Subject: [PATCH 5/7] Update docker-entrypoint name in dockerfile --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index ba6cbba7..6c998a66 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -104,7 +104,7 @@ USER "${PROJECT_USER}:${PROJECT_USER}" EXPOSE 8000 -ENTRYPOINT ["bash", "./entrypoint.sh"] +ENTRYPOINT ["bash", "./docker-entrypoint.sh"] CMD ["start"] # CMD ["sh", "docker-entrypoint.sh"] # #ENTRYPOINT ["docker-entrypoint.sh"] From a39cd8433891918b87d58c304dc553c73db4f0d5 Mon Sep 17 00:00:00 2001 From: nataliaweni Date: Fri, 15 Dec 2023 04:14:59 -0300 Subject: [PATCH 6/7] Adjust docker-entrypoint --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 6c998a66..bb8642ba 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -104,7 +104,7 @@ USER "${PROJECT_USER}:${PROJECT_USER}" EXPOSE 8000 -ENTRYPOINT ["bash", "./docker-entrypoint.sh"] +ENTRYPOINT ["docker-entrypoint.sh"] CMD ["start"] # CMD ["sh", "docker-entrypoint.sh"] # #ENTRYPOINT ["docker-entrypoint.sh"] From 1cc8200c255a5833cfed46d2c62e7b1f93973a75 Mon Sep 17 00:00:00 2001 From: nataliaweni Date: Fri, 15 Dec 2023 04:22:20 -0300 Subject: [PATCH 7/7] Adjust docker-entrypoint command in the dockerfile --- docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index bb8642ba..fe13cf83 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -104,7 +104,7 @@ USER "${PROJECT_USER}:${PROJECT_USER}" EXPOSE 8000 -ENTRYPOINT ["docker-entrypoint.sh"] +ENTRYPOINT ["bash", "docker-entrypoint.sh"] CMD ["start"] # CMD ["sh", "docker-entrypoint.sh"] # #ENTRYPOINT ["docker-entrypoint.sh"]