perf: reduce RAM usage for 1GB host
- MariaDB: limit innodb buffer pool to 128M, max 20 connections - Celery worker: concurrency 2→1 - Flower: moved to 'flower' profile (opt-in, not started by default) Start with: docker compose --profile flower up -d flower Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@ services:
|
||||
db:
|
||||
image: mariadb:11.4
|
||||
restart: unless-stopped
|
||||
command: --innodb-buffer-pool-size=128M --max-connections=20
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
|
||||
MYSQL_DATABASE: ${DB_NAME}
|
||||
@@ -73,7 +74,7 @@ services:
|
||||
condition: service_healthy
|
||||
db:
|
||||
condition: service_healthy
|
||||
command: celery -A web.tasks.celery_app worker --loglevel=info --concurrency=2 --queues=default,sync,health,notifications -E
|
||||
command: celery -A web.tasks.celery_app worker --loglevel=info --concurrency=1 --queues=default,sync,health,notifications -E
|
||||
|
||||
beat:
|
||||
build:
|
||||
@@ -97,6 +98,7 @@ services:
|
||||
context: .
|
||||
dockerfile: Dockerfile.web
|
||||
restart: unless-stopped
|
||||
profiles: [flower]
|
||||
ports:
|
||||
- "5555:5555"
|
||||
environment:
|
||||
|
||||
Reference in New Issue
Block a user