Gramps Web with nginx proxy manager (NMP) docker container

Is there a guide for exposing Gramps Web to the internet using Nginx Proxy Manager? I already have it setup for other containers, but it doesn’t behave the same way for Gramps. I’m using the docker-compose file without the nginx and acme components. Thank you!

I don’t know it so I suspect there is no guide.

For those interested in using Gramps Web with NXPM, I was able to get the docker compose file working with the following config:

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_cache:/app/cache  # persist export and report caches
      - gramps_secret:/app/secret  # persist flask secret
      - gramps_db:/root/.gramps/grampsdb  # persist Gramps database
      - gramps_media:/app/media  # persist media files
      - gramps_tmp:/tmp

  grampsweb_celery:
    image: ghcr.io/gramps-project/grampsweb:latest
    restart: always
    container_name: grampsweb_celery
    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
    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_cache:
  gramps_secret:
  gramps_db:
  gramps_media:
  gramps_tmp:
1 Like

Hi @mreugene, can you elaborate a bit? This is just the default compose file with a different port exposed, right? How do you set it up with NXPM? Are you willing to write a complete guide for the docs at grampsweb.org?

Wanted to leave a quick note here since I ran into 502 errors while trying to deploy gramps web via docker compose and access it through nginxproxy manager (npm).

  • make sure that the grampsweb service is on the same docker bridge network as the npm container (so that npm can direct traffic to the grampsweb container). not confirming this (either via command line or via a manager like portainer) resulted in 502 errors every time I tried to access via the CNAME I’d assigned for the container and set up in NPM.

  • also make sure that all three containers in the grampsweb docker compose (grampsweb, grampsweb_celery, and grampsweb_redis) are on the same network so that they can talk to another. failing to do this meant that I was directed to the login page instead of the create admin user page when I first loaded up the site.