Change port from 8080 to 8999

Container listens on 8999 and docker-compose maps 8999:8999. README and
TEST.md examples updated to http://localhost:8999.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 06:26:40 -07:00
co-authored by Claude Opus 5.5
parent ce9b2aa514
commit 2711e592cf
4 changed files with 30 additions and 30 deletions
+20 -20
View File
@@ -10,7 +10,7 @@ PCI DSS / GDPR status and estimated latency to 40 cities.
```bash
cp .env.example .env # then set ADMIN_USERNAME and ADMIN_PASSWORD (at least 10 characters)
docker compose up -d --build
open http://localhost:8080 # sign in as the admin
open http://localhost:8999 # sign in as the admin
```
On first run, Coremarket creates the admin account from `ADMIN_USERNAME` / `ADMIN_PASSWORD`. If no
@@ -86,13 +86,13 @@ In the web page, the account menu (your username, top right) has **API keys**, *
Coremarket has a JSON REST API. The web page uses the same API.
- **Base URL:** `http://localhost:8080/api/v1`
- **Base URL:** `http://localhost:8999/api/v1`
- **Authentication:** every call needs an API key in the `X-API-Key` header (or
`Authorization: Bearer <key>`). Create keys under **Account → API keys**. See
[Authentication](#authentication).
- **Interactive docs:** `http://localhost:8080/docs` (Swagger UI, where you can try every call; sign in
first). There's also `http://localhost:8080/redoc`.
- **OpenAPI spec:** `http://localhost:8080/openapi.json` (for generating client code; needs a key or
- **Interactive docs:** `http://localhost:8999/docs` (Swagger UI, where you can try every call; sign in
first). There's also `http://localhost:8999/redoc`.
- **OpenAPI spec:** `http://localhost:8999/openapi.json` (for generating client code; needs a key or
sign-in)
- **Prices** are USD per month unless a field says otherwise. Latencies are estimated round-trip times
in milliseconds.
@@ -105,17 +105,17 @@ alias cm='curl -s -H "X-API-Key: $KEY"'
# Cheapest GDPR-compliant European option per provider for the Good tier,
# with average/worst latency to Paris and Berlin
cm "http://localhost:8080/api/v1/quote?tier=good&continent=europe&compliance=gdpr&cities=par,ber&best_per_provider=true&limit=5"
cm "http://localhost:8999/api/v1/quote?tier=good&continent=europe&compliance=gdpr&cities=par,ber&best_per_provider=true&limit=5"
# HIPAA-eligible options for the Best tier, closest to Bogota and Lima first
cm "http://localhost:8080/api/v1/quote?tier=best&compliance=hipaa&cities=bog,lim&sort=rtt_max_ms&limit=5"
cm "http://localhost:8999/api/v1/quote?tier=best&compliance=hipaa&cities=bog,lim&sort=rtt_max_ms&limit=5"
# Just the VM size for Base plus Vaultwarden, 20 concurrent users
cm -X POST http://localhost:8080/api/v1/size -H 'Content-Type: application/json' \
cm -X POST http://localhost:8999/api/v1/size -H 'Content-Type: application/json' \
-d '{"tier": "base", "apps": ["vaultwarden"], "concurrent": 20}'
# Every option as a spreadsheet (one column per city latency)
cm -o quote.csv "http://localhost:8080/api/v1/quote?tier=better&format=csv"
cm -o quote.csv "http://localhost:8999/api/v1/quote?tier=better&format=csv"
```
### Endpoints
@@ -161,22 +161,22 @@ Health check: `GET /healthz` (outside `/api/v1`, no sign-in).
```bash
# Admin: create an account, then a 90-day key for it
cm -X POST http://localhost:8080/api/v1/users -H 'Content-Type: application/json' \
cm -X POST http://localhost:8999/api/v1/users -H 'Content-Type: application/json' \
-d '{"username": "alice", "password": "a-long-password", "role": "user"}'
# -> {"id": 2, "username": "alice", "role": "user", "disabled": false, ...}
cm -X POST http://localhost:8080/api/v1/keys -H 'Content-Type: application/json' \
cm -X POST http://localhost:8999/api/v1/keys -H 'Content-Type: application/json' \
-d '{"name": "alice reporting", "expires_days": 90, "user_id": 2}'
# -> {"key": "cmk_1a2b3c4d_...", "id": 5, "prefix": "cmk_1a2b3c4d_…", "username": "alice", "expires_at": ..., "warning": "..."}
# Disable, re-enable, or delete the account
cm -X PATCH http://localhost:8080/api/v1/users/2 -H 'Content-Type: application/json' -d '{"disabled": true}'
cm -X PATCH http://localhost:8080/api/v1/users/2 -H 'Content-Type: application/json' -d '{"disabled": false}'
cm -X DELETE http://localhost:8080/api/v1/users/2
cm -X PATCH http://localhost:8999/api/v1/users/2 -H 'Content-Type: application/json' -d '{"disabled": true}'
cm -X PATCH http://localhost:8999/api/v1/users/2 -H 'Content-Type: application/json' -d '{"disabled": false}'
cm -X DELETE http://localhost:8999/api/v1/users/2
# Any user: list and revoke your own keys
cm http://localhost:8080/api/v1/keys
cm -X DELETE http://localhost:8080/api/v1/keys/5
cm http://localhost:8999/api/v1/keys
cm -X DELETE http://localhost:8999/api/v1/keys/5
```
### Sizing and quote parameters
@@ -256,10 +256,10 @@ Contabo has no pricing API, so its prices live in an editable sheet:
```bash
# Read the current sheet
cm http://localhost:8080/api/v1/providers/contabo/price-sheet
cm http://localhost:8999/api/v1/providers/contabo/price-sheet
# Replace it (admin; prices in the sheet's currency, per month; surcharge is % per region code)
cm -X PUT http://localhost:8080/api/v1/providers/contabo/price-sheet -H 'Content-Type: application/json' \
cm -X PUT http://localhost:8999/api/v1/providers/contabo/price-sheet -H 'Content-Type: application/json' \
-d '{
"currency": "EUR", "fx": 1.16, "setup_fee": 2.00,
"plans": [
@@ -270,7 +270,7 @@ cm -X PUT http://localhost:8080/api/v1/providers/contabo/price-sheet -H 'Content
}'
# Go back to the built-in sheet
cm -X DELETE http://localhost:8080/api/v1/providers/contabo/price-sheet
cm -X DELETE http://localhost:8999/api/v1/providers/contabo/price-sheet
```
Plan fields: `name`, `vcpu`, `ram_gb` and `price` are required. `code`, `disk_gb`, `cpu_type`
@@ -279,7 +279,7 @@ Plan fields: `name`, `vcpu`, `ram_gb` and `price` are required. `code`, `disk_gb
### Latency measurement
```bash
cm -X POST http://localhost:8080/api/v1/latency/measure -H 'Content-Type: application/json' \
cm -X POST http://localhost:8999/api/v1/latency/measure -H 'Content-Type: application/json' \
-d '{"host": "ash-speed.hetzner.com", "city": "was"}'
# -> {"host": "...", "city": "Washington DC", "probe_scope": "city", "min_ms": ..., "results": [{"probe": "Washington, US (...)", "avg_ms": ...}, ...]}
```