nioc / xmpp-web

Lightweight web chat client for XMPP server
GNU Affero General Public License v3.0
142 stars 20 forks source link

Docker install uses localhost as ws endpoint despite having it set to something else #114

Closed codingneko closed 10 months ago

codingneko commented 10 months ago

Hi, I installed xmpp-web using the provided docker-compose file, and replacting the host port in it with 8086 and proxying it through nginx, I'm not sure which websocket url I am supposed to provide in XMPP_WS so I assumed it's my XMPP server's but it looks like it's not updating it at all and it just uses localhost regardless of what I put here. My docker-compose.yml looks like this

version: "3.4"
services:
  xmpp-web:
    image: nioc/xmpp-web:latest
    ports:
      - "8086:80"
    environment:
      - XMPP_WS=https://chat.catboy.baby/xmpp-websocket
      - APP_DEFAULT_DOMAIN=chat.catboy.baby

And my nginx config looks like this:

server {
  listen 443 ssl;
  ssl_certificate /etc/letsencrypt/live/catboy.baby-0001/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/catboy.baby-0001/privkey.pem;

  server_name web.chat.catboy.baby;

  location / {
      proxy_pass http://127.0.0.1:8086;
      proxy_set_header Host $host;
      proxy_http_version 1.1;
      proxy_redirect off;

      # For WebSocket
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection $connection_upgrade;
  }
}

This is the error I'm getting in the Firefox console: image

Can I get some help please? 🥺 If you want to have a look yourselves, it's over at https://web.chat.catboy.baby and the ws endpoint is https://chat.catboy.baby/xmpp-websocket

codingneko commented 10 months ago

Nevermind, apologies, I'm at the office, and apparently my office network was blocking my subdomain in a weird way so that I could still access it but I couldn't connect to any XMPP servers... Very odd