Hello! I’ve been trying to host Gramps Web on an Amazon Linux EC2 instance. I’m able to stand up the server without issue, and register the owner account, but when I try to use the web app itself, most things will cause an alert to come up, showing Error: Error 502
. Some pages, such as the map, are completely blank. The browser’s console is full of 502 Bad Gateway
errors for all the requests to /api
, and I get lines like the following in the logs for the nginx-proxy
:
*25 no live upstreams while connecting to upstream, client: xxx.xxx.xxx.xxx, server: my.domain.com, request: "GET /api/users/ HTTP/2.0", upstream: "http://my.domain.com/api/users/", host: "my.domain.com", referrer: "https://my.domain.com/settings"
My configuration is as follows:
nginx_proxy.conf
client_max_body_size 500m;
docker-compose.yml
version: "3.7"
services:
grampsweb: &grampsweb
container_name: grampsweb
image: ghcr.io/gramps-project/grampsweb:latest
restart: always
environment:
GRAMPSWEB_TREE: "Gramps Web" # will create a new tree if not exists
VIRTUAL_PORT: "5000"
VIRTUAL_HOST: my.domain.com # e.g. gramps.mydomain.com
LETSENCRYPT_HOST: my.domain.com # e.g. gramps.mydomain.com
LETSENCRYPT_EMAIL: my@email.com # 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
GUNICORN_NUM_WORKERS: 2
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
- 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
command: celery -A gramps_webapi.celery worker --loglevel=INFO
grampsweb_redis:
image: redis:alpine
container_name: grampsweb_redis
restart: always
proxy:
image: 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: 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:
None of the containers other than nginx-proxy
show any errors in their logs (except grampsweb
not being able to find some media files referenced in the tree I uploaded, which I imagine is unrelated). Any help is appreciated; thank you!