hedgedoc/dev-reverse-proxy/Caddyfile
David Mehren f7f052fca1 refactor: use separate env vars for frontend/backend port
As we moved to a combined .env file for simplicity, frontend and backend need to be configured with separate variables.

Signed-off-by: David Mehren <git@herrmehren.de>
2023-03-26 15:53:49 +02:00

20 lines
572 B
Caddyfile

#
# SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file)
#
# SPDX-License-Identifier: AGPL-3.0-only
#
{$HD_BASE_URL}
log {
output stdout
level WARN
format console
}
reverse_proxy /realtime http://127.0.0.1:{$HD_BACKEND_PORT:3000}
reverse_proxy /api/* http://127.0.0.1:{$HD_BACKEND_PORT:3000}
reverse_proxy /public/* http://127.0.0.1:{$HD_BACKEND_PORT:3000}
reverse_proxy /uploads/* http://127.0.0.1:{$HD_BACKEND_PORT:3000}
reverse_proxy /apidoc/* http://127.0.0.1:{$HD_BACKEND_PORT:3000}
reverse_proxy /* http://127.0.0.1:{$HD_FRONTEND_PORT:3001}