fix(deploy): use port 8000 as Compose default

This commit is contained in:
Christian Johannesen 2026-10-18 16:54:43 +02:00
parent 093d489b13
commit 9351d1eb09
4 changed files with 7 additions and 7 deletions

View file

@ -2,8 +2,8 @@ NODE_ENV=development
PORT=3001
DATABASE_URL=./data/tech-library.db
# Docker Compose host binding. Change both values when using another port.
HOST_PORT=8144
WEB_ORIGIN=http://localhost:8144
HOST_PORT=8000
WEB_ORIGIN=http://localhost:8000
ADMIN_USERNAME=admin
# Generate with: npm run password:hash -w @tech-library/api -- "your password"
ADMIN_PASSWORD_HASH=

View file

@ -37,7 +37,7 @@ Open `http://localhost:5173`. The API runs on port 3001. Local content is stored
| `npm run db:seed` | Add the curated starter catalog |
| `docker compose up -d --build` | Build and run the production topology |
The Compose stack listens on host port `8144` by default. Copy `.env.example` to `.env` and change `HOST_PORT` plus `WEB_ORIGIN` when another port or public origin is required.
The Compose stack listens on host port `8000` by default. Copy `.env.example` to `.env` and change `HOST_PORT` plus `WEB_ORIGIN` when another port or public origin is required.
## Repository structure

View file

@ -4,7 +4,7 @@ services:
context: .
target: web
ports:
- "${HOST_PORT:-8144}:80"
- "${HOST_PORT:-8000}:80"
depends_on:
api:
condition: service_healthy
@ -18,7 +18,7 @@ services:
NODE_ENV: production
PORT: 3001
DATABASE_URL: /data/tech-library.db
WEB_ORIGIN: ${WEB_ORIGIN:-http://localhost:8144}
WEB_ORIGIN: ${WEB_ORIGIN:-http://localhost:8000}
ADMIN_USERNAME: ${ADMIN_USERNAME:-admin}
ADMIN_PASSWORD_HASH: ${ADMIN_PASSWORD_HASH:?Set ADMIN_PASSWORD_HASH}
SESSION_SECRET: ${SESSION_SECRET:?Set SESSION_SECRET}

View file

@ -3,9 +3,9 @@
## Deployment
1. Generate an Argon2id hash with `npm run password:hash -w @tech-library/api -- "a strong password"`.
2. Copy `.env.example` to `.env`, set the hash, a random 32+ character session secret, `HOST_PORT` (default `8144`), and the matching public `WEB_ORIGIN`.
2. Copy `.env.example` to `.env`, set the hash, a random 32+ character session secret, `HOST_PORT` (default `8000`), and the matching public `WEB_ORIGIN`.
3. Run `docker compose up -d --build`.
4. Verify `http://host:8144/healthz` (or the configured `HOST_PORT`) and the API health check through Docker Compose.
4. Verify `http://host:8000/healthz` (or the configured `HOST_PORT`) and the API health check through Docker Compose.
Terminate TLS at a trusted reverse proxy and forward HTTPS to the configured host port. Restrict filesystem access to the Docker volume and secrets file.