Clarify deployment defaults

This commit is contained in:
2026-08-26 02:04:38 +00:00
parent a762d80693
commit 64435223e2
+20 -16
View File
@@ -34,23 +34,24 @@ git clone https://github.com/CharlesWithC/HubFrontend.git upstream/HubFrontend
cp .env.example .env cp .env.example .env
``` ```
Set `VITE_CONFIG_URL` to the client configuration endpoint of your Drivers Hub The provided `.env.example` already uses the standard backend prefix and client
backend. The URL usually has this format: configuration path. In `VITE_CONFIG_URL`, replace `hub.example.com` with your
public Hub domain:
```text ```text
https://hub.example.com/api/client/config/global https://hub.example.com/api/client/config/global
``` ```
Create an hCaptcha site for the public frontend domain. Set its public site key Create an hCaptcha site for the public frontend domain. Set its public site key
as `VITE_HCAPTCHA_SITEKEY`. Set the related secret in the backend in the provided `VITE_HCAPTCHA_SITEKEY` setting. The backend deployment README
`config/config.json` file. The site key is included in the frontend files and is shows the related `captcha.secret` setting. The site key is included in the
not a secret. frontend files and is not a secret.
Enable the `client-config` external plugin in the backend configuration. The The documented backend configuration already enables the required
single-hub build derives the API base URL from `VITE_CONFIG_URL`. The backend `client-config` external plugin. The single-hub build derives the API base URL
`abbr` can contain the VTC abbreviation and does not have to match the API from `VITE_CONFIG_URL`. The backend `abbr` can contain the VTC abbreviation and
prefix. This deployment-specific behavior does not apply when does not have to match the API prefix. This deployment-specific behavior does
`VITE_USE_MULTIHUB` is `true`. not apply when `VITE_USE_MULTIHUB` is `true`.
The frontend uses the Vite values during the image build. Rebuild the image after The frontend uses the Vite values during the image build. Rebuild the image after
you change `.env`, including the hCaptcha site key. you change `.env`, including the hCaptcha site key.
@@ -73,12 +74,15 @@ bind address is suitable for a reverse proxy on the Docker host.
## Configure a reverse proxy ## Configure a reverse proxy
The following examples assume that the reverse proxy runs on the Docker host. The following examples assume that the reverse proxy runs on the Docker host.
Replace `hub.example.com` with the public frontend domain. Keep Replace `hub.example.com` with the public frontend domain. The examples use the
`FRONTEND_BIND=127.0.0.1:18080` in the frontend `.env`. The examples also assume default addresses from both deployment repositories:
that Drivers Hub: Backend listens on `127.0.0.1:17777` and uses the `/api` prefix. `FRONTEND_BIND=127.0.0.1:18080` for the frontend and
They do not publish the API documentation or the upstream service restart `BACKEND_BIND=127.0.0.1:17777` with the `/api` prefix for the backend. You do not
endpoint. The restart endpoint does not manage a Docker container. All other have to change these values. If you do change one, update the related proxy
API routes remain available to the frontend and configured external services. target below. The examples do not publish the API documentation or the upstream
service restart endpoint. The restart endpoint does not manage a Docker
container. All other API routes remain available to the frontend and configured
external services.
### Standalone Nginx ### Standalone Nginx