perf: reduce memory (drop flask debug, celery concurrency=2, MALLOC_ARENA_MAX)
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/push/woodpecker Pipeline was successful
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
c0f62e5b62
commit
bf76c506eb
1 file changed
+6
-2
+6
-2
@@ -2,7 +2,7 @@ services:
|
||||
office-xbot-app:
|
||||
container_name: office-xbot-app
|
||||
image: "${APP_IMAGE}"
|
||||
command: "flask --app app:create_app run --debug --port 8080 --host 0.0.0.0"
|
||||
command: "flask --app app:create_app run --port 8080 --host 0.0.0.0"
|
||||
ports:
|
||||
- "0.0.0.0:8080:8080"
|
||||
environment:
|
||||
@@ -20,6 +20,7 @@ services:
|
||||
- OFFICE_XBOT_TABLE_ID=${OFFICE_XBOT_TABLE_ID}
|
||||
- OFFICE_XBOT_VIEW_ID=${OFFICE_XBOT_VIEW_ID}
|
||||
- TZ=Asia/Shanghai
|
||||
- MALLOC_ARENA_MAX=2
|
||||
healthcheck:
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/index')"]
|
||||
interval: 30s
|
||||
@@ -31,7 +32,7 @@ services:
|
||||
office-xbot-celery:
|
||||
container_name: office-xbot-celery
|
||||
image: "${APP_IMAGE}"
|
||||
command: "celery -A app.make_celery worker -B --loglevel INFO"
|
||||
command: "celery -A app.make_celery worker -B --loglevel INFO --concurrency=2"
|
||||
environment:
|
||||
- APP_ID=${APP_ID}
|
||||
- APP_SECRET=${APP_SECRET}
|
||||
@@ -48,6 +49,7 @@ services:
|
||||
- OFFICE_XBOT_VIEW_ID=${OFFICE_XBOT_VIEW_ID}
|
||||
- FEISHU_GROUP_CHAT_ID=${FEISHU_GROUP_CHAT_ID}
|
||||
- TZ=Asia/Shanghai
|
||||
- MALLOC_ARENA_MAX=2
|
||||
healthcheck:
|
||||
test: ["CMD", "celery", "inspect", "ping"]
|
||||
interval: 10s
|
||||
@@ -69,6 +71,7 @@ services:
|
||||
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- MALLOC_ARENA_MAX=2
|
||||
|
||||
office-xbot-flower:
|
||||
container_name: office-xbot-flower
|
||||
@@ -83,6 +86,7 @@ services:
|
||||
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- MALLOC_ARENA_MAX=2
|
||||
|
||||
|
||||
networks:
|
||||
|
||||
Reference in new issue
Block a user