Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions examples/docker-compose-base/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ services:
GRAMPSWEB_CELERY_CONFIG__broker_url: "redis://grampsweb_redis:6379/0"
GRAMPSWEB_CELERY_CONFIG__result_backend: "redis://grampsweb_redis:6379/0"
GRAMPSWEB_RATELIMIT_STORAGE_URI: redis://grampsweb_redis:6379/1
healthcheck:
test: [ "CMD-SHELL", "wget -t 1 -q --spider http://127.0.0.1:5000 || exit 1" ]
interval: 30s
retries: 5
start_period: 10s
timeout: 3s
depends_on:
- grampsweb_redis
grampsweb_redis:
condition: service_healthy
restart: true
volumes:
- gramps_users:/app/users # persist user database
- gramps_index:/app/indexdir # persist search index
Expand All @@ -25,14 +33,28 @@ services:
<<: *grampsweb # YAML merge key copying the entire grampsweb service config
ports: []
container_name: grampsweb_celery
healthcheck:
test: [ "CMD-SHELL", "export GRAMPSWEB_SECRET_KEY=$(cat /app/secret/secret); celery -A gramps_webapi.celery inspect ping" ]
interval: 30s
retries: 5
start_period: 15s
timeout: 10s
Copy link
Copy Markdown
Contributor

@qugu qugu Nov 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! But could take longer than 10s when a semantic search is enabled:

root@807bf7e60f4d:/app# time celery -A gramps_webapi.celery inspect ping

(celery:231): Gtk-CRITICAL **: 17:46:33.599: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
INFO:sentence_transformers.SentenceTransformer:Use pytorch device_name: cpu
INFO:sentence_transformers.SentenceTransformer:Load pretrained SentenceTransformer: sentence-transformers/distiluse-base-multilingual-cased-v2
->  celery@807bf7e60f4d: OK
        pong

1 node online.

real    0m12.493s
user    0m8.697s
sys     0m1.124s

In which scenario did you test?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried without semantic search enabled. In fact, those values were a start point and it just worked, that's why I didn't even try to adjust them.

I'll change that to 15.

depends_on:
- grampsweb_redis
grampsweb_redis:
condition: service_healthy
restart: true
command: celery -A gramps_webapi.celery worker --loglevel=INFO --concurrency=2

grampsweb_redis:
image: docker.io/library/redis:7.2.4-alpine
container_name: grampsweb_redis
restart: always
healthcheck:
test: [ "CMD", "redis-cli", "--raw", "incr", "ping" ]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s

volumes:
gramps_users:
Expand Down