I gathered that. The question is, how do I determine what is wrong?
All I have to go on is what is provided in the documentation and the provided docker-compose.yml file and what I can scrounge up on the internet.
There are only, far as I can tell, a few things for me to specify and I think those are correct.
Attempting to “surf” my way to a solution, I see referenced to the docker command “export” as in, I guess, making a port visible to other containers, or to nginx-proxy, but I see none in the docker-compose.yml file.
I can post the file I am using, if someone cares to review it. Or provide it in some other way if more appropriate.
BTW, I am no longer receiving email notification of replies to my posts.
Below is a snippet of the file containing my edits. The other local edits worked in the non proxy configuration. I did try "GRAMPSWEB_BASE_URL:“www.mydomain.com” with no apparent change in response.
version: “3.7”
services:
grampsweb: &grampsweb
container_name: grampsweb
image: Package grampsweb · GitHub
restart: always
environment: &grampsweb-env
GRAMPSWEB_TREE: “Gramps Web” # will create a new tree if not exists
VIRTUAL_PORT: “5000”
VIRTUAL_HOST: “mydomain.com” # e.g. gramps.mydomain.com
LETSENCRYPT_HOST: “mydomain.com” # e.g. gramps.mydomain.com
LETSENCRYPT_EMAIL: “joea@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
GRAMPSWEB_EMAIL_USE_TLS: “false”
GRAMPSWEB_EMAIL_HOST: “mail.someplace.com”
GRAMPSWEB_EMAIL_HOST_USER: “admin@mydomain.com”
GRAMPSWEB_EMAIL_PORT: 587
GRAMPSWEB_EMAIL_HOST_PASSWORD: “SoMeWoRd”
GRAMPSWEB_DEFAULT_FROM_EMAIL: “admin@mydomain.com”
GRAMPSWEB_BASE_URL: “mydomain.com”
The provided docker-compose file is a combination of several open source services of which Gramps Web is only one. If you are facing issues already with the nginx Proxy, it might be worth checking their documentation. You should also use docker-compose logs ... to look at the logs of all the services, that might give you a hint what is wrong.
By the way, BASE_URL should be a URL, i.e. start with https://. But that can’t be the cause of your issue.
I found that even though https://mydomain.com will bring up the registration page, https://mydomain.com, after presenting the certificate warning, also gives a 503 error.
Checking logs earlier did not reveal any warnings or errors, the nginx-proxy logs showing the 503 errors and/or the transactions when in worked.
There is this, but, have always seen it:
$ docker logs grampsweb_redis
1:C 06 Feb 2024 20:38:16.960 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
1:C 06 Feb 2024 20:38:16.960 * Redis version=7.2.4, bits=64, commit=00000000, modified=0, pid=1, just started
1:C 06 Feb 2024 20:38:16.960 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
This has been once a rewarding and very painful process. More painful at the moment.
BTW there seems to be a +5 hour discrepancy in the logged time vs my server’s time (NTP in use).
Thanks, that helped. By “wrong subdomain”, do you mean anything other than “www.mydomain.com”?
That aside for now, I can now access the first run page via htttp://www.mydomain.com, but https://www.mydomain.com produces “500 Error Internal Server Error”.
Edit: Oh dear, just noticed the GET is different as well.
Edit1: After deleting the certs stored in FF for that site, accessing https does present the certificate warning, but, upon accepting it, again presents the 500 error.
If I make "VIRTUAL_HOST: “www.mydomain.com, mydomain.com, My_IP_ADDR”
Then the grampsweb page can be reached, by entering any of those in the browser. At first I did get a 502 bad gateway, but after a few moments a reload worked fine. I did not wait long after completing “docker-compose up -d” to try it so perhaps the first try was before things settled.
No further testing was done, it was just a curiosity thing on my part.
I still get the 500 Internal server error attempting https access and have come up empty looking at logs, event within containers, and searching the internet.
I hope it is not “bad manners” to tag you in this fashion.
Perhaps related to my other issue(s) in this thread, I found, via “docker compose config”, that the celery container may not be inheriting values previously defined. It was my understanding that it is not necessary to repeatedly enter the values.
In the documentation, there is a YAML merge key that copies all the environment variables, but you removed that, so you have to repeat the env variables.
If you get server error 500, that’s likely raised by Gramps Web API, so please inspect its logs.
# overriding let's encrypt variables since celery is not exposed
VIRTUAL_PORT: "5000"
VIRTUAL_HOST: "www.my-domain.com.my-domain.com"
LETSENCRYPT_HOST: "www.my-domain.com,my-domain.com"
LETSENCRYPT_EMAIL: "joea@my-email.com"
They should all be “” as in the example file. We are copying all environment variables from the other service, but those ones have to be unset again as we DON’T want to expose the celery service. This can explain your issues.
I made those as you stated. Same problem exists,500 error, even after starting fresh, ie “docker-compose down --rmi” and “docker volume prune all” and “docker-compose up -d”.
I don’t know if this is significant, but after an evolution such as above, the first access to “http://my-domain.com” produces as 502 bad gateway error for perhaps a minute or so, then will access without error. I just dismissed that as the Pi4b being slow to initialize everything.