docs: update all documentation to reflect current project state

This commit is contained in:
2026-04-23 14:35:08 -04:00
parent 8b31045dcf
commit 3029ce7053
9 changed files with 566 additions and 639 deletions
+26 -17
View File
@@ -1,41 +1,47 @@
# Caddy Configuration
Caddy handles SSL termination and routes to the application services.
Caddy handles SSL termination and routes to the application services running on `172.20.1.238`.
## Caddyfile Example
```caddy
coop.hobokenchicken.com {
# Frontend (Next.js)
handle_path /* {
reverse_proxy localhost:3000
handle /* {
reverse_proxy 172.20.1.238:3000
}
# API routes
handle_path /api/* {
reverse_proxy localhost:3001
# API routes — use handle (NOT handle_path) to preserve /api/ prefix
handle /api/* {
reverse_proxy 172.20.1.238:3002
}
# Webhooks
handle_path /webhooks/* {
reverse_proxy localhost:3001
handle /webhooks/* {
reverse_proxy 172.20.1.238:3002
}
# WebSocket support
handle_path /socket.io/* {
reverse_proxy localhost:3001
handle /socket.io/* {
reverse_proxy 172.20.1.238:3002
}
}
```
> **Critical:** Use `handle` (not `handle_path`) for `/api/*` and `/webhooks/*`. `handle_path` strips the path prefix, which breaks Express routing.
## Docker Compose (no nginx)
Services bind to localhost only (`127.0.0.1`):
Services bind as follows:
- **Frontend**: `127.0.0.1:3000`
- **Backend**: `127.0.0.1:3001`
- **Postgres**: `5432` (internal only)
- **Redis**: `6379` (internal only)
- **Frontend**: `0.0.0.0:3000` (bridge network, accessible from Caddy)
- **Backend**: `localhost:3002` (host network, accessible from Caddy via host IP)
- **Postgres**: `127.0.0.1:5432` (localhost only)
- **Redis**: `127.0.0.1:6379` (localhost only)
## Backend Port
Backend runs on **port 3002** (not 3001). Caddy must proxy to `172.20.1.238:3002`.
## Start Stack
@@ -43,8 +49,11 @@ Services bind to localhost only (`127.0.0.1`):
# Start services
docker-compose up -d
# Verify
curl http://localhost:3001/health
# Verify backend
curl http://172.20.1.238:3002/health
# Verify frontend
curl http://172.20.1.238:3000
```
Caddy automatically provisions SSL and routes traffic.