Dockerfile
FROM python:3.10 AS poetryFROM node:18 AS webpack RUN mkdir /frontend/WORKDIR /frontend/COPY ./prophecies/apps/frontend/ /frontend/ RUN yarn config set network-timeout 300000RUN yarn --non-interactive --production=falseRUN yarn build FROM python:3.10 ENV PYTHONUNBUFFERED 1ENV PORT 8008ENV POETRY_VERSION 1.7.1ENV POETRY_HOME "/opt/poetry"ENV POETRY_VIRTUALENVS_IN_PROJECT trueENV POETRY_NO_INTERACTION 1ENV PATH "$POETRY_HOME/bin:$PATH"ENV DJANGO_SETTINGS_MODULE "prophecies.settings.production" RUN curl -sSL https://install.python-poetry.org | python3 - -y --version $POETRY_VERSION RUN mkdir /code/WORKDIR /code COPY . /code/COPY --from=webpack /frontend/dist/ /code/prophecies/apps/frontend/dist/ RUN poetry installRUN poetry run python manage.py collectstatic --noinput ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.3.0/wait /usr/bin/waitRUN chmod +x /usr/bin/wait CMD /usr/bin/wait && poetry run gunicorn prophecies.wsgi -b 0.0.0.0:${PORT:-8008}