feat: use separate hostname env variable

pull/63/head
Paul Makles 2 years ago
parent 4dcde911e9
commit 84f99b1e93
No known key found for this signature in database
GPG Key ID: 5059F398521BB0F6

@ -8,6 +8,10 @@ MONGODB=mongodb://database
# 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
REVOLT_APP_URL=http://local.revolt.chat

@ -1,4 +1,4 @@
{$REVOLT_APP_URL} {
{$HOSTNAME} {
route /api* {
uri strip_prefix /api
reverse_proxy http://api:8000

@ -95,6 +95,31 @@ You will also want to change the protocols to enable HTTPS:
+ 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
You can insecurely expose the database by adding a port definition:

Loading…
Cancel
Save