Fix for python3.11

This commit is contained in:
2022-10-26 22:49:49 +02:00
parent 0ea35e7bb4
commit ed9cd02a9c
4 changed files with 50 additions and 45 deletions

View File

@@ -1,12 +1,12 @@
FROM ghcr.io/flibusta-apps/base_docker_images:3.10-poetry-buildtime as build-image
FROM ghcr.io/flibusta-apps/base_docker_images:3.11-poetry-buildtime as build-image
WORKDIR /root/poetry
COPY pyproject.toml poetry.lock /root/poetry/
ENV VENV_PATH=/opt/venv
RUN poetry export --without-hashes > requirements.txt \
&& python -m venv $VENV_PATH \
&& . "${VENV_PATH}/bin/activate" \
&& . /opt/venv/bin/activate \
&& pip install -r requirements.txt --no-cache-dir
@@ -16,11 +16,11 @@ ENV VENV_PATH=/opt/venv
ENV PATH="$VENV_PATH/bin:$PATH"
COPY ./src/ /app/
COPY ./scripts/healthcheck.py /root/
COPY ./scripts/* /root/
COPY --from=build-image $VENV_PATH $VENV_PATH
EXPOSE 8080
WORKDIR /app/
CMD gunicorn -k uvicorn.workers.UvicornWorker main:app --bind 0.0.0.0:8080 --timeout 600
CMD bash /root/start.sh