How to edit Revolt.toml on Docker?
I can't find the Revolt.toml file in any of the docker containers. Does anyone know how to edit Revolt.toml on a docker deployment? Thank you!
Originally posted by @fvlasie in https://github.com/revoltchat/self-hosted/issues/82#issuecomment-2188215277
I am trying to solve the problem of url: "ws://local.revolt.chat/ws" showing in console.
same
I had the same problem and here is how I could make it work.
You need to download the file Revolt.toml and put it at the same level as the docker-compose.yml file.
If you host revolt on an external server, you need to modify your Revolt.toml file to adapt all your URLs.
After that, you modify the docker-compose,yml file to add this Revolt.toml file as a volume for both containers api and events, something like this:
# API server (delta)
api:
image: ghcr.io/revoltchat/server:latest
env_file: .env
depends_on:
- database
- redis
- caddy
restart: always
volumes:
- ./Revolt.toml:/Revolt.toml
# Events service (quark)
events:
image: ghcr.io/revoltchat/bonfire:latest
env_file: .env
depends_on:
- database
- redis
- caddy
restart: always
volumes:
- ./Revolt.toml:/Revolt.toml
Then you docker compose up -d to restart those two containers, and you should be good.
Thank you very much for your help. I tried what you recommended but I just get a blank page when accessing the server URL through the browser.
[root@server revolt]# curl -v localhost
* Rebuilt URL to: localhost/
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 80 (#0)
> GET / HTTP/1.1
> Host: localhost
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Server: Caddy
< Date: Sat, 06 Jul 2024 03:30:51 GMT
< Content-Length: 0
<
* Connection #0 to host localhost left intact
Sorry, I was being dumb! I did not set the custom domain in .env. It is all working now!
Thanks @jquiaios You are a wonderful person! :)