ci: change backend start cmd

This commit is contained in:
GuoQing Zhang
2024-12-19 18:53:14 +08:00
parent f5aade7bde
commit 467bd99ef3
3 changed files with 8 additions and 1 deletions
+4
View File
@@ -0,0 +1,4 @@
nohup uvicorn bisheng.main:app --host 0.0.0.0 --port 7860 --no-access-log --workers 2 &
# -c 是指定celery的并发数
celery -A bisheng.worker.main worker -l info -c 4
+2 -1
View File
@@ -72,10 +72,11 @@ services:
BS_MINIO_SECRET_KEY: 'minioadmin'
volumes:
- ${DOCKER_VOLUME_DIRECTORY:-.}/bisheng/config/config.yaml:/app/bisheng/config.yaml
- ${DOCKER_VOLUME_DIRECTORY:-.}/bisheng/entrypoint.sh:/app/entrypoint.sh
- ${DOCKER_VOLUME_DIRECTORY:-.}/data/bisheng:/app/data
security_opt:
- seccomp:unconfined
command: bash -c "uvicorn bisheng.main:app --host 0.0.0.0 --port 7860 --no-access-log --workers 2" # --workers 表示使用几个进程,提高并发度
command: sh entrypoint.sh # --workers 表示使用几个进程,提高并发度
restart: on-failure
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7860/health"]
+2
View File
@@ -1,5 +1,7 @@
FROM dataelement/bisheng-backend:base.v1
WORKDIR /app
COPY ./ ./
RUN poetry config virtualenvs.create false