Running gramps-web via docker with traefik as reverse proxy #279
-
Hello all, I would like to use gramps-web using Traefik as a reverse proxy, as I use it to use all my other services. Unfortunately, I am having difficulties with this. So I was wondering if there is an example of how someone else has implemented it using Traefik instead of nginx-proxy? Thanks a lot and greetings, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I am not aware of an example (which doesn't mean none exists). |
Beta Was this translation helpful? Give feedback.
-
This is my config. I've already set up an entrypoint to get a wildcard SSL cert. I also use a middleware that sets some HTTP headers to enhance security. My version: "3.7"
services:
grampsweb: &grampsweb
image: ghcr.io/gramps-project/grampsweb:latest
container_name: grampsweb
networks:
- default
- web
environment:
GRAMPSWEB_TREE: "My family" # 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:
- /home/gramps/app/users:/app/users # persist user database
- /home/gramps/app/indexdir:/app/indexdir # persist search index
- /home/gramps/app/thumbnail_cache:/app/thumbnail_cache # persist thumbnails
- /home/gramps/app/cache:/app/cache # persist export and report caches
- /home/gramps/app/secret:/app/secret # persist flask secret
- /home/gramps/app/grampsdb:/root/.gramps/grampsdb # persist Gramps database
- /home/gramps/app/media:/app/media # persist media files
- /home/gramps/app/tmp:/tmp
labels:
- "traefik.enable=true"
- "traefik.docker.network=web"
- "traefik.http.routers.gramps.entrypoints=websecure"
- "traefik.http.routers.gramps.rule=Host(`gramps.my.domain`)"
- "traefik.http.services.gramps.loadbalancer.server.port=5000"
- "traefik.http.routers.gramps.middlewares=security@docker"
restart: unless-stopped
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
labels: []
grampsweb-redis:
image: redis:alpine
container_name: grampsweb-redis
restart: unless-stopped
networks:
web:
external: true |
Beta Was this translation helpful? Give feedback.
This is my config. I've already set up an entrypoint to get a wildcard SSL cert. I also use a middleware that sets some HTTP headers to enhance security. My
web
network is analogous to yourtraefik_proxy
network.