mirror of
https://github.com/stoatchat/self-hosted.git
synced 2026-03-20 01:35:16 -05:00
feat: use separate hostname env variable
This commit is contained in:
@@ -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
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
### 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:
|
||||
|
||||
Reference in New Issue
Block a user