ssl enforce

This commit is contained in:
2026-05-10 19:40:57 +02:00
parent 3398982ca8
commit 279befa2ad
8 changed files with 67 additions and 7 deletions

View File

@@ -10,7 +10,7 @@ npm run import:smoke
npm start
```
Open Swagger UI at `http://localhost:3030/docs`.
Open Swagger UI locally at `http://localhost:3030/docs`.
## Docker
@@ -18,7 +18,26 @@ Open Swagger UI at `http://localhost:3030/docs`.
docker compose up --build
```
The API listens on `http://localhost:8030` by default when run through Docker Compose. Set `API_HOST_PORT=3031` if your machine needs the alternate host port.
The container listens on `3030` and Docker Compose exposes it on `8030` by default. Set `API_HOST_PORT=3031` if your machine needs the alternate host port.
## Public HTTPS Domains
This app is configured for Dokploy/Traefik HTTPS by default. Traefik should terminate TLS and route both public HTTPS domains to the app container:
```text
https://dune.api.coppnic.cc -> container port 3030
https://ui.dune.api.coppnic.cc -> container port 3030
```
The public API URL is `https://dune.api.coppnic.cc`. Swagger UI is available at `https://ui.dune.api.coppnic.cc/docs`.
The OpenAPI document advertises the HTTPS API domain by default, so Swagger requests go to the right public API host. These values can be adjusted through environment variables:
```env
PUBLIC_API_URL=https://dune.api.coppnic.cc
PUBLIC_UI_URL=https://ui.dune.api.coppnic.cc
FORCE_HTTPS=true
```
## Import All Data