fix: rename directory, fix script and correct README.md

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-09-25 16:24:10 +02:00
parent a9435e3652
commit 92a77d0489
5 changed files with 19 additions and 14 deletions

View file

@ -0,0 +1,12 @@
<!--
SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
SPDX-License-Identifier: CC-BY-SA-4.0
-->
To use backend and frontend together you need a reverse proxy that combines both services under one URL origin.
We provide a ready to use config for caddy.
Make sure that the backend is running on port 3000 with the env var HD_DOMAIN set to `http://localhost:8080` and the frontend is running on port 3001 with the env var HD_EDITOR_BASE_URL set to `http://localhost:8080/`.
You can either use the script `run-caddy.sh` in this directory or download a caddy binary from [caddy](https://caddyserver.com/) and start it using `caddy run`.

View file

@ -6,5 +6,11 @@
# #
set -e set -e
curl -o caddy "https://caddyserver.com/api/download?os=linux&arch=amd64"
if [ ! -f caddy ]
then
curl -o caddy "https://caddyserver.com/api/download"
chmod +x ./caddy chmod +x ./caddy
fi
exec ./caddy run

View file

@ -1,13 +0,0 @@
<!--
SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
SPDX-License-Identifier: CC-BY-SA-4.0
-->
To use backend and frontend together you need a reverse proxy that combines both services under one origin.
We provide a ready to use config for nginx and caddy.
Make sure that in the backend HD_DOMAIN is set to `http://localhost:8080`.
If you have docker you can use our docker-compose file that starts a nginx using `docker-compose up`.
If you're on Windows or macOS you rather might want to download [caddy](https://caddyserver.com/) and start it using `caddy run` in this directory.