feat(dev): add one-command local Stalwart test server + workflow docs
Add docker-compose.yml: a disposable Stalwart instance with a fixed dev admin account (STALWART_RECOVERY_ADMIN), matching the credentials scripts/dev-token.ps1 already expected. Wired up via new npm scripts (dev:server, dev:server:down, dev:server:logs). scripts/dev-token.ps1 was previously untracked (the whole scripts/ directory was gitignored) even though it's part of the documented dev workflow — un-ignored it, and added scripts/dev-token.sh, a POSIX equivalent for non-Windows shells and AI agents without PowerShell. New DEVELOPMENT.md documents the full loop end-to-end (start server, get a token, run the dev server, verify), written so it's actionable by both humans and AI coding agents without needing a browser. Linked from AGENTS.md (Commands) and README.md (Getting started). Verified manually: docker compose up brings the server to a healthy state, /api/auth + /auth/token issue a working bearer token, and /jmap/session returns 200 with it end-to-end.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
services:
|
||||
stalwart:
|
||||
image: stalwartlabs/stalwart:latest
|
||||
container_name: stalwart-webui-dev
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
# HTTP management/JMAP API — the only port the WebUI dev proxy needs
|
||||
# (see server.proxy in vite.config.ts).
|
||||
- "8080:8080"
|
||||
# Mail protocols, only needed if you're testing actual mail flows
|
||||
# (sending/receiving, not just admin UI screens).
|
||||
- "25:25"
|
||||
- "587:587"
|
||||
- "465:465"
|
||||
- "143:143"
|
||||
- "993:993"
|
||||
- "110:110"
|
||||
- "995:995"
|
||||
- "4190:4190"
|
||||
volumes:
|
||||
- stalwart-etc:/etc/stalwart
|
||||
- stalwart-data:/var/lib/stalwart
|
||||
environment:
|
||||
# Disposable local dev credentials — do not reuse for anything real.
|
||||
# Matches scripts/dev-token.ps1's defaults.
|
||||
STALWART_RECOVERY_ADMIN: "admin@example.org:c8321iEscHDy0GWV"
|
||||
|
||||
volumes:
|
||||
stalwart-etc:
|
||||
stalwart-data:
|
||||
Reference in New Issue
Block a user