Since Gramps Web does not support importing gpkg file, how to import media files?

Hi,
I did used for a long time the portable version of Gramps. I paused for a couple of years and now I want to start where I left.
My setup is a raspberry pi 4 with 8GB RAM on which I have a NFS share from my NAS. I wanted to try the new GrampsJS interface and so made the execution as described on the documents (Deployment > Docker). I’m using the proposed docker-compose.yml file (though I changed the port 80 to keep 5000).
The execution was perfect.
My only issue is that the import only supports importing a .gramps file (plain XML) but not the package one (gpkg), so even though the import was successful I cannot see the media information (the sources references are correctly imported but the media obviously not).
Is there a way to manually copy the media files to the docker container or mount a NFS share to docker? (I’m not a docker expert) so that the media files can be recovered and that I don’t have to add them one by one?

When a I did the backup I did it in both formats: gramps and gpkg. I also kept the file structure of my media files on my NAS (and on a separate USB drive). So I do have the files and the relative structure.

Thanks for any pointer.

Jorge

Finally I managed to make it work.
I’m leaving here what I did in case some else runs into the same issue.

On the docker-compose.yml file I changed the following line under volumes (inside service, below grampsweb) :

 - gramps_media:/app/media  # persist media files

by replacing gramps_media by the path of my NFS mount. so the file ended up like this:

version: "3.7"

services:
  grampsweb: &grampsweb
    image: ghcr.io/gramps-project/grampsweb:latest
    restart: always
    ports:
      - "5000: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:/app/users  # persist user database
      - gramps_index:/app/indexdir  # persist search index
      - gramps_thumb_cache:/app/thumbnail_cache  # persist thumbnails
      - gramps_secret:/app/secret  # persist flask secret
      - gramps_db:/root/.gramps/grampsdb  # persist Gramps database
      - /nfs/genealogy/media:/app/media  # persist media files
      - gramps_tmp:/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

  grampsweb_redis:
    image: redis:alpine
    container_name: grampsweb_redis
    restart: always

volumes:
  gramps_users:
  gramps_index:
  gramps_thumb_cache:
  gramps_secret:
  gramps_db:
  gramps_media:
  gramps_tmp:

after making the change running again docker-compose up -d updated the environment execution and I could actually see my media files.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.