nostr:nprofile1qqsw9n8heusyq0el9f99tveg7r0rhcu9tznatuekxt764m78ymqu36cpz4mhxue69uhhyetvv9ujuat50phjummwv5hszymhwden5te0wahhgtn4w3ux7tn0dejj7qg4waehxw309an8yetwwvh82arcduhx7mn99uuwx66a, I'm currently setting up a WoT relay but WebSocket connections are failing despite being accessible over my domain and localhost.
Errors I've had:
- The Docker container doesn't bind to port 3334 due to the systemd service running there.
- I start the Docker container on a different port (3335, 8080, 8008, etc.) with the systems service running, but still no connections are made.
- If I stop the systemd service, I get a 502 error with the index.html path not being accessible, even with the Docker container running.
Thoughts? Running on a 2 GB/2 vCPU DigitalOcean droplet with a reserved IP.
Have you checked your docker logs?
The logs of the containers you’re running
Yes; tells me nothing other than the path to index.html doesn't exist when the container is running.
Is your code in a repo so I can check? I'm quite familiar with Docker
Yeah, I'm just following nostr:nprofile1qqsw9n8heusyq0el9f99tveg7r0rhcu9tznatuekxt764m78ymqu36cpz4mhxue69uhhyetvv9ujuat50phjummwv5hszymhwden5te0wahhgtn4w3ux7tn0dejj7qg4waehxw309an8yetwwvh82arcduhx7mn99uuwx66a's WoT relay repo:
https://github.com/bitvora/wot-relay
This message?
$ http: panic serving 100.114.176.46:58517: open public/index.html: no such file or directory
Yes! Exactly that.
On my end as well I was setting it up as root, which I thought could be one of the issues.
I think I've found the issue.
It's because the files don't exist in the destination configured here:
https://github.com/bitvora/wot-relay/blob/master/docker-compose.yml#L11
And these paths are defined in the .env:
https://github.com/bitvora/wot-relay/blob/master/.env.example#L13
which are loaded / used in the Go binary.
So what is described that you only should edit the left side before the colon is incorrect? So '- "./templates/index.html:/app/templates/index.html"' should be the same as the INDEX_PATH value in the .env. The same logic applies for the STATIC_PATH.
So "./templates/index.html:/app/templates/index.html" would become "./templates/index.html:<SET_THE_SAME_INDEX_PATH_AS_DEFINED_IN_THE_ENV_FILE>"