How to Series - Gramps for Web untuk mengelola riwayat silsilah keluarga
Table of Content
Reference
- https://www.grampsweb.org/install_setup/deployment/
Summary
Saya sudah lama mengenal aplikasi Gramps versi desktop (https://gramps-project.org/)) dari versi portable-nya di https://portableapps.com/apps/education/gramps_portable. Aplikasi ini mudah digunakan untuk menyimpan generasi silsilah keluarga.
Sekarang ada versi web-nya, sehingga pengelolaan silsilah keluarga lebih mudah dan ter-control dengan fitur multi-user.
Aplikasi ini memasang hampir semua fitur yang ada di Gramps versi desktop.
Personal Opinion
Gramps versi web ini sudah stabil dan dapat digunakan sebagai alternatif multi-user Gramps versi desktop. Akan tetapi, aplikasi ini di-optimasi untuk penggunaan multi-user yang cukup banyak sehingga membutuhkan requirement yang cukup besar dan akan sangat berat dijalankan di server mini $5 Digital Ocean (ram 1GB, 1vcpu).
Untuk kebutuhan keluarga yang mungkin hanya diakses oleh 2-5 orang, versi aplikasi berbasis ini terlalu berat. Sehingga saya balik menggunakan versi desktop.
Tips :
Jika hanya membutuhkan online review dari hasil Gramps versi desktop, bisa menggunakan Topola Viewer, https://pewu.github.io/topola-viewer/#/ yang dapat dikonversi dari file Gramps. Orang lain dapat membaca hasil dari aplikasi Gramps tanpa perlu instalasi sebagai online viewer.
Prerequisites
How to
Alt 1 : Docker Compose tanpa HTTPS (local)
services:
grampsweb: &grampsweb
image: ghcr.io/gramps-project/grampsweb:latest
restart: always
ports:
- "80: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:
<<: *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:
Alt 2 : Docker Compose dengan Letsencrypt
services:
grampsweb: &grampsweb
container_name: grampsweb
image: ghcr.io/gramps-project/grampsweb:latest
restart: always
environment: &grampsweb-env
GRAMPSWEB_TREE: "Gramps Web" # will create a new tree if not exists
VIRTUAL_PORT: "5000"
VIRTUAL_HOST: ... # e.g. gramps.mydomain.com
LETSENCRYPT_HOST: ... # e.g. gramps.mydomain.com
LETSENCRYPT_EMAIL: ... # your email
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
volumes:
- gramps_users:/app/users
- gramps_index:/app/indexdir
- gramps_thumb_cache:/app/thumbnail_cache
- gramps_cache:/app/cache
- gramps_secret:/app/secret
- gramps_db:/root/.gramps/grampsdb
- gramps_media:/app/media # bisa diganti ke directory local (not volume)
- gramps_tmp:/tmp
networks:
- proxy-tier
- default
grampsweb_celery:
<<: *grampsweb # YAML merge key copying the entire grampsweb service config
container_name: grampsweb_celery
depends_on:
- grampsweb_redis
environment:
<<: *grampsweb-env # YAML merge key copying the grampsweb environment config
# overriding let's encrypt variables since celery is not exposed
VIRTUAL_PORT: ""
VIRTUAL_HOST: ""
LETSENCRYPT_HOST: ""
LETSENCRYPT_EMAIL: ""
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
proxy:
image: docker.io/nginxproxy/nginx-proxy
container_name: nginx-proxy
restart: always
ports:
- 80:80
- 443:443
environment:
ENABLE_IPV6: "true"
volumes:
- ./nginx_proxy.conf:/etc/nginx/conf.d/my_proxy.conf:ro
- conf:/etc/nginx/conf.d
- dhparam:/etc/nginx/dhparam
- certs:/etc/nginx/certs:ro
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- proxy-tier
acme-companion:
image: docker.io/nginxproxy/acme-companion
container_name: nginx-proxy-acme
restart: always
environment:
NGINX_PROXY_CONTAINER: nginx-proxy
volumes:
- certs:/etc/nginx/certs:rw
- vhost.d:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- acme:/etc/acme.sh
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- proxy-tier
depends_on:
- proxy
volumes:
acme:
certs:
conf:
dhparam:
vhost.d:
html:
gramps_users:
gramps_index:
gramps_thumb_cache:
gramps_cache:
gramps_secret:
gramps_db:
gramps_media:
gramps_tmp:
networks:
proxy-tier:
dan nginx_proxy.conf
di directory yang sama dengan file docker-compose.yml
client_max_body_size 500m;
Additional
- Limiting Gunicorn Workers
services:
grampsweb:
environment:
GUNICORN_NUM_WORKERS: 2
- Limiting Celery Workers
grampsweb_celery:
command: celery -A gramps_webapi.celery worker --loglevel=INFO --concurrency=2
Gramps Sync
ref: https://www.grampsweb.org/administration/sync/
- install
Gramps Web Sync
addon in Gramps Desktop - install python keyring
sudo apt install python3-keyring
- if there is problem, debug via
gramps --debug grampswebsync
docker compose logs --tail 100 grampsweb and docker compose logs --tail 100 grampsweb-celery
Other Reading
- Gramps desktop : https://www.gramps-project.org/
- Gramps vesi web : https://www.grampsweb.org/
- Topola Viewer : https://pewu.github.io/topola-viewer/#/
- Family Chart via React/Vue : https://github.com/donatso/family-chart