So… I am trying to use Swordbattle with Docker and Caddy. This is my docker-compose:
version: '3.3'
services:
swordbattleio:
image: swordbattleio
build: .
ports:
- 3300:3300
environment:
- PORT=3300
caddy:
image: caddy
ports:
- 80:80
- 443:443
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
And this is my Caddyfile:
swordio-docker.REDACTED.REDACTED {
reverse_proxy localhost:3300
}
When running docker-compose up
, everything looks ok, Swordbattle works at (domain):3300, but when i go to the domain:
{"level":"error","ts":1697901854.7101161,"logger":"http.log.error","msg":"dial tcp 127.0.0.1:3300: connect: connection refused","request":{"remote_ip":"MYIP","remote_port":"63673","client_ip":"MYIP","proto":"HTTP/2.0","method":"GET","host":"swordio-docker.tpglit.ch","uri":"/","headers":{"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36"],"Sec-Fetch-Site":["none"],"Sec-Fetch-User":["?1"],"Accept-Language":["en-US,en;q=0.9"],"Cache-Control":["max-age=0"],"Sec-Ch-Ua":["\"Chromium\";v=\"118\", \"Google Chrome\";v=\"118\", \"Not=A?Brand\";v=\"99\""],"Sec-Ch-Ua-Mobile":["?0"],"Upgrade-Insecure-Requests":["1"],"Cookie":[],"Sec-Ch-Ua-Platform":["\"Windows\""],"Accept":["text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7"],"Sec-Fetch-Dest":["document"],"Sec-Fetch-Mode":["navigate"],"Accept-Encoding":["gzip, deflate, br"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":"swordio-docker.REDACTED.REDACTED"}},"duration":0.00081531,"status":502,"err_id":"mcxn67e7z","err_trace":"reverseproxy.statusError (reverseproxy.go:1265)"}
Any help appreciated