From 9351d1eb0950702d44182df2d5430b8b40c2b255 Mon Sep 17 00:00:00 2001 From: Christian Johannesen Date: Sun, 18 Oct 2026 16:54:43 +0200 Subject: [PATCH] fix(deploy): use port 8000 as Compose default --- .env.example | 4 ++-- README.md | 2 +- docker-compose.yml | 4 ++-- docs/operations.md | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.env.example b/.env.example index e43fe22..1af9e64 100644 --- a/.env.example +++ b/.env.example @@ -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= diff --git a/README.md b/README.md index 4b8db34..97d2ce9 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 7637def..95911e7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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} diff --git a/docs/operations.md b/docs/operations.md index 5f8668a..69d0c7f 100644 --- a/docs/operations.md +++ b/docs/operations.md @@ -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.