docker-compose.yml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. version: "3.7"
  2. services:
  3. grampsweb: &grampsweb
  4. image: ghcr.io/gramps-project/grampsweb:latest
  5. restart: unless-stopped
  6. ports:
  7. - "80:5000" # host:docker
  8. environment:
  9. GRAMPSWEB_TREE: "Gramps Web" # will create a new tree if not exists
  10. GRAMPSWEB_CELERY_CONFIG__broker_url: "redis://grampsweb_redis:6379/0"
  11. GRAMPSWEB_CELERY_CONFIG__result_backend: "redis://grampsweb_redis:6379/0"
  12. GRAMPSWEB_RATELIMIT_STORAGE_URI: redis://grampsweb_redis:6379/1
  13. depends_on:
  14. - grampsweb_redis
  15. volumes:
  16. - ./gramps_users:/app/users # persist user database
  17. - ./gramps_index:/app/indexdir # persist search index
  18. - ./gramps_thumb_cache:/app/thumbnail_cache # persist thumbnails
  19. - ./gramps_cache:/app/cache # persist export and report caches
  20. - ./gramps_secret:/app/secret # persist flask secret
  21. - ./gramps_db:/root/.gramps/grampsdb # persist Gramps database
  22. - ./gramps_media:/app/media # persist media files
  23. - ./gramps_tmp:/tmp
  24. networks:
  25. - asgard
  26. grampsweb_celery:
  27. <<: *grampsweb # YAML merge key copying the entire grampsweb service config
  28. ports: []
  29. container_name: grampsweb_celery
  30. depends_on:
  31. - grampsweb_redis
  32. command: celery -A gramps_webapi.celery worker --loglevel=INFO
  33. networks:
  34. - asgard
  35. grampsweb_redis:
  36. image: redis:alpine
  37. container_name: grampsweb_redis
  38. restart: unless-stopped
  39. networks:
  40. - asgard
  41. volumes:
  42. gramps_users:
  43. gramps_index:
  44. gramps_thumb_cache:
  45. gramps_cache:
  46. gramps_secret:
  47. gramps_db:
  48. gramps_media:
  49. gramps_tmp:
  50. networks:
  51. asgard:
  52. name: asgard
  53. external: true