forked from kofal.net/stoatchat-self-hosted
feat: use separate hostname env variable
This commit is contained in:
@@ -8,6 +8,10 @@ MONGODB=mongodb://database
|
|||||||
# Redis
|
# Redis
|
||||||
REDIS_URI=redis://redis/
|
REDIS_URI=redis://redis/
|
||||||
|
|
||||||
|
# Hostname used for Caddy
|
||||||
|
# This should in most cases match REVOLT_APP_URL
|
||||||
|
HOSTNAME=http://local.revolt.chat
|
||||||
|
|
||||||
# URL to where the Revolt app is publicly accessible
|
# URL to where the Revolt app is publicly accessible
|
||||||
REVOLT_APP_URL=http://local.revolt.chat
|
REVOLT_APP_URL=http://local.revolt.chat
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{$REVOLT_APP_URL} {
|
{$HOSTNAME} {
|
||||||
route /api* {
|
route /api* {
|
||||||
uri strip_prefix /api
|
uri strip_prefix /api
|
||||||
reverse_proxy http://api:8000
|
reverse_proxy http://api:8000
|
||||||
|
|||||||
25
README.md
25
README.md
@@ -95,6 +95,31 @@ You will also want to change the protocols to enable HTTPS:
|
|||||||
+ REVOLT_EXTERNAL_WS_URL=wss://my.domain/ws
|
+ REVOLT_EXTERNAL_WS_URL=wss://my.domain/ws
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Putting Revolt behind another reverse proxy (or on a non-standard port)
|
||||||
|
|
||||||
|
Override the port definitions on `caddy`:
|
||||||
|
|
||||||
|
```yml
|
||||||
|
# docker-compose.yml
|
||||||
|
services:
|
||||||
|
caddy:
|
||||||
|
ports:
|
||||||
|
- "1234:80"
|
||||||
|
```
|
||||||
|
|
||||||
|
> **Warning**
|
||||||
|
> This file is not Git ignored, it may be sufficient to use an override file but that will not remove port 80 / 443 allocations.
|
||||||
|
|
||||||
|
Update the hostname used by the web server:
|
||||||
|
|
||||||
|
```diff
|
||||||
|
# .env
|
||||||
|
- HOSTNAME=http://local.revolt.chat
|
||||||
|
+ HOSTNAME=:80
|
||||||
|
```
|
||||||
|
|
||||||
|
You can now reverse proxy to http://localhost:1234.
|
||||||
|
|
||||||
### Expose database
|
### Expose database
|
||||||
|
|
||||||
You can insecurely expose the database by adding a port definition:
|
You can insecurely expose the database by adding a port definition:
|
||||||
|
|||||||
Reference in New Issue
Block a user