add reverse proxy to docker-comopse and readme

This commit is contained in:
Maxi Quoß
2022-07-23 11:13:46 +02:00
parent 6a472beaee
commit bc5c9497a1
4 changed files with 15 additions and 0 deletions

View File

@@ -34,6 +34,18 @@ There are 3 example docker-compose files to choose from. The simplest is [docker
The website will be available at [localhost:8000](http://localhost:8000). If you run it on a different pc, it will be `http://<your-ip>:8000`. You can change the port in the docker-compose file.
### Reverse Proxy
If you're using a reverse proxy, make sure to set `BACKEND_IS_PROXIED` to true in docker-compose. Set your reverse proxy to the `FRONTEND_PORT` and set `/wol/` to `BACKEND_PORT`.
**Caddy example**
```
upsnap.example.com {
reverse_proxy localhost:8000
reverse_proxy /wol/ localhost:8001
}
```
### Databases
Upsnap supports 3 different databases. Postgres, MySQL and SQLite. If you already have an existing database you want to use, delete the database container from the compose file. Always make sure to set the correct database type environment variable, e.g. DB_TYPE=mysql

View File

@@ -8,6 +8,7 @@ services:
environment:
- FRONTEND_PORT=8000
- BACKEND_PORT=8001
- BACKEND_IS_PROXIED=false # set this to true, if you use a reverse proxy
- DB_TYPE=mysql # required
- REDIS_HOST=127.0.0.1 # required (make sure to use the same ip as below)
- REDIS_PORT=6379 # required (make sure to use the same port as below)

View File

@@ -8,6 +8,7 @@ services:
environment:
- FRONTEND_PORT=8000
- BACKEND_PORT=8001
- BACKEND_IS_PROXIED=false # set this to true, if you use a reverse proxy
- DB_TYPE=postgres # required
- REDIS_HOST=127.0.0.1 # required (make sure to use the same ip as below)
- REDIS_PORT=6379 # required (make sure to use the same port as below)

View File

@@ -8,6 +8,7 @@ services:
environment:
- FRONTEND_PORT=8000
- BACKEND_PORT=8001
- BACKEND_IS_PROXIED=false # set this to true, if you use a reverse proxy
- DB_TYPE=sqlite # required
- REDIS_HOST=127.0.0.1 # required (make sure to use the same ip as below)
- REDIS_PORT=6379 # required (make sure to use the same port as below)