Skip to content

Commit

Permalink
chore: make docker-compose use less memory (apache#28773)
Browse files Browse the repository at this point in the history
Co-authored-by: Evan Rusackas <[email protected]>
  • Loading branch information
2 people authored and EnxDev committed May 31, 2024
1 parent c23847f commit 344a3ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,8 @@ services:
required: true
- path: docker/.env-local # optional override
required: false
environment:
CELERYD_CONCURRENCY: 2
restart: unless-stopped
depends_on: *superset-depends-on
user: *superset-user
Expand Down Expand Up @@ -211,12 +213,15 @@ services:
required: true
- path: docker/.env-local # optional override
required: false
profiles:
- optional
environment:
DATABASE_HOST: localhost
DATABASE_DB: test
REDIS_CELERY_DB: 2
REDIS_RESULTS_DB: 3
REDIS_HOST: localhost
CELERYD_CONCURRENCY: 8
network_mode: host
depends_on: *superset-depends-on
user: *superset-user
Expand Down
3 changes: 2 additions & 1 deletion docker/docker-bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ fi
case "${1}" in
worker)
echo "Starting Celery worker..."
celery --app=superset.tasks.celery_app:app worker -O fair -l INFO
# setting up only 2 workers by default to contain memory usage in dev environments
celery --app=superset.tasks.celery_app:app worker -O fair -l INFO --concurrency=${CELERYD_CONCURRENCY:-2}
;;
beat)
echo "Starting Celery beat..."
Expand Down

0 comments on commit 344a3ae

Please sign in to comment.