From ad62cf69cdc97d548fab92eae30a3218622f16c0 Mon Sep 17 00:00:00 2001 From: wang <842355358@qq.com> Date: Wed, 3 Jul 2024 13:37:39 +0800 Subject: [PATCH] 1 --- docker-compose.yml | 2 +- python/Dockerfile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2401c83..82076d9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: ports: - '8000:8000' - '8765:8765' - command: gunicorn -w 3 -t 60 -b 0.0.0.0:8000 app:app + command: tail -f /dev/null code-server: build: ./docker/code-server diff --git a/python/Dockerfile b/python/Dockerfile index a624406..94a0170 100644 --- a/python/Dockerfile +++ b/python/Dockerfile @@ -25,6 +25,7 @@ ENV PATH="$VIRTUAL_ENV/bin:$PATH" # 安装包 COPY --from=build-dmpython --chown=flask:flask /home/dmdba/build_artifacts/dmPython-2.5.5-cp310-cp310-linux_x86_64.whl . + RUN python3 -m venv "$VIRTUAL_ENV" && \ export FLASK_APP=app.py && \ pip3 install dmPython-2.5.5-cp310-cp310-linux_x86_64.whl && rm dmPython-2.5.5-cp310-cp310-linux_x86_64.whl && \ @@ -37,4 +38,4 @@ COPY --from=build-frontend /usr/src/app/build/ /home/flask/public/ EXPOSE 8000 22 8765 USER root -CMD ["gunicorn", "-w", "3", "-t", "60", "-b", "0.0.0.0:8000", "app:app"] \ No newline at end of file +# CMD ["gunicorn", "-w", "3", "-t", "60", "-b", "0.0.0.0:8000", "app:app"] \ No newline at end of file