mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 23:24:46 -04:00
fix: rename directory, fix script and correct README.md
Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
a9435e3652
commit
92a77d0489
5 changed files with 19 additions and 14 deletions
5
dev-reverse-proxy/.gitignore
vendored
Normal file
5
dev-reverse-proxy/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
# SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
#
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
caddy
|
16
dev-reverse-proxy/Caddyfile
Normal file
16
dev-reverse-proxy/Caddyfile
Normal file
|
@ -0,0 +1,16 @@
|
|||
#
|
||||
# SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
#
|
||||
|
||||
:8080
|
||||
|
||||
log {
|
||||
output stdout
|
||||
}
|
||||
|
||||
reverse_proxy /realtime http://127.0.0.1:3000
|
||||
reverse_proxy /api/* http://127.0.0.1:3000
|
||||
reverse_proxy /public/* http://127.0.0.1:3000
|
||||
reverse_proxy /* http://127.0.0.1:3001
|
12
dev-reverse-proxy/README.md
Normal file
12
dev-reverse-proxy/README.md
Normal 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`.
|
16
dev-reverse-proxy/run-caddy.sh
Normal file
16
dev-reverse-proxy/run-caddy.sh
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
#
|
||||
|
||||
set -e
|
||||
|
||||
if [ ! -f caddy ]
|
||||
then
|
||||
curl -o caddy "https://caddyserver.com/api/download"
|
||||
chmod +x ./caddy
|
||||
fi
|
||||
|
||||
exec ./caddy run
|
Loading…
Add table
Add a link
Reference in a new issue