Skip to content

Docker: Update to Latest Image/Release Cleared All Persistent Volumes, Showing First-Run Screen #647

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
thebigjoe1 opened this issue Apr 24, 2025 · 2 comments

Comments

@thebigjoe1
Copy link

thebigjoe1 commented Apr 24, 2025

Describe the bug
After updating from a previous release of Gramps Web (25.4.0) to the latest version using Docker and Portainer, the application presented the first-run setup screen. Upon inspection, all the persistent data directories associated with the defined Docker volumes (gramps_users, gramps_index, gramps_thumb_cache, gramps_cache, gramps_secret, gramps_db, gramps_media, and gramps_tmp) were found to be empty. This indicates a complete loss of all previously entered genealogical data, user configurations, search indexes, and cached files.

To Reproduce
Steps to reproduce the behavior:

  1. Have a previous installation of Gramps Web running via Docker Compose (configuration similar to the provided docker-compose.yml).
  2. Update the Gramps Web container to the latest version (e.g., by recreating the container in Portainer or using docker-compose down && docker-compose pull && docker-compose up -d).
  3. Access the Gramps Web interface in a browser.
  4. Observe the first-run setup screen is presented.
  5. Inspect the contents of the Docker volumes associated with /opt/docker-apps/grampsweb/* on the host system or within a temporary container attached to these volumes.
  6. Observe that all the aforementioned volume directories are empty.

Expected behavior
Upon updating to the latest version, Gramps Web should have continued to use the existing data located in the persistent volumes. The user should not have been presented with the first-run setup screen, and all previously existing data and configurations should have been accessible.

Gramps Web 25.4.1
 - Device: x86 mini PC
 - OS: Arch Linux
 - Kernel: x86_64 Linux 6.13.8-arch1-1
 - Version: 25.4.1

Browser information
 - Browser: Vivaldi
 - Version: 7.3.3635.11 (Stable channel) (64-bit)

Additional context
The Gramps Web instance is running inside a Docker container, managed with Portainer. The docker-compose.yml file used for deployment is provided below:

services:
  grampsweb: &grampsweb
    image: ghcr.io/gramps-project/grampsweb:latest
    container_name: grampsweb
    restart: always
    ports:
      - "8225:5000"  # host:docker
    environment:
      GRAMPSWEB_TREE: "Gramps Web"  # will create a new tree if not exists
      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
    depends_on:
      - grampsweb_redis
    volumes:
      - gramps_users:/opt/docker-apps/grampsweb/users  # persist user database
      - gramps_index:/opt/docker-apps/grampsweb/indexdir  # persist search index
      - gramps_thumb_cache:/opt/docker-apps/grampsweb/thumbnail_cache  # persist thumbnails
      - gramps_cache:/opt/docker-apps/grampsweb/cache  # persist export and report caches
      - gramps_secret:/opt/docker-apps/grampsweb/secret  # persist flask secret
      - gramps_db:/opt/docker-apps/grampsweb/grampsdb  # persist Gramps database
      - gramps_media:/opt/docker-apps/grampsweb/media  # persist media files
      - gramps_tmp:/opt/docker-apps/grampsweb/tmp

  grampsweb_celery:
    <<: *grampsweb  # YAML merge key copying the entire grampsweb service config
    ports: []
    container_name: grampsweb_celery
    depends_on:
      - grampsweb_redis
    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

volumes:
  gramps_users:
  gramps_index:
  gramps_thumb_cache:
  gramps_cache:
  gramps_secret:
  gramps_db:
  gramps_media:
  gramps_tmp:
@thebigjoe1
Copy link
Author

digging into this a bit more, it seems that the named volumes should have allowed for persistence, but i think to prevent this issue in the future i can use bind mounts instead. Let me know what the best approach is, but again i think bind mounts will be my fix

@DavidMStraub
Copy link
Member

There is related discussion here, but if at all, this is a Docker bug/issue not related to Gramps Web, so I'll close this issue.

gramps-project/gramps-web-docs#19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants