Closed Tchoupinax closed 1 year ago
How to configure each domain name in .env after using caddy or traefik. For example, local.revolt.chat:5000 local.revolt.chat:8000.
Hello @iSwiftLiu,
For the moment, both configuration are configured with revolt.chat
as the domain. After this pull request, the next one will be with a customized configuration that ask you the domain you want to use and deploy the configuration according it.
A couple of notes: if you're using caddy you probably using https so the setup will be like
api:
image: revoltchat/server:master
container_name: revolt_api
# you don't need to expose ports if all is connected with caddy
#ports:
# - "8000:8000"
# - "9000:9000"
...
revolt.chat {
route /api/* {
uri strip_prefix api
reverse_proxy revolt_api:8000
....
# also websocket needs CORS
ws.revolt.chat {
header {
Access-Control-Allow-Origin https://revolt.chat
Access-Control-Allow-Headers https://revolt.chat
}
@websocket {
header Connection *Upgrade*
header upgrade websocket
}
...
all the links will be like
REVOLT_APP_URL=https://revolt.chat
REVOLT_PUBLIC_URL=https://revolt.chat/api
...
Closing as I'm cleaning up issues currently. This did have a few issues at the time I think, if you want it reconsidered please reply and we can figure out how to structure this.
Hello!
I saw the todo list contains the action
add Caddy
so I made it and I add Traefik at the same time 😀Be free to suggest any improvement or feedback
Thank you for your work! Have a nice day