diff --git a/README.md b/README.md index 28d6fab2..a3df0896 100644 --- a/README.md +++ b/README.md @@ -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://: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 diff --git a/docker-compose-mysql.yml b/docker-compose-mysql.yml index bb5fdc23..29947b36 100644 --- a/docker-compose-mysql.yml +++ b/docker-compose-mysql.yml @@ -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) diff --git a/docker-compose-postgres.yml b/docker-compose-postgres.yml index 7c5c6f03..d86f2592 100644 --- a/docker-compose-postgres.yml +++ b/docker-compose-postgres.yml @@ -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) diff --git a/docker-compose-sqlite.yml b/docker-compose-sqlite.yml index 501d0871..60c4c385 100644 --- a/docker-compose-sqlite.yml +++ b/docker-compose-sqlite.yml @@ -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)