BigBrainParking/server/deploy/bigbrainparking.mowden.top.conf
Erik c14081d85f server: zone-labels API (Fastify + SQLite) — Phase A
New server/ service classifying zones as free_2h/3h/4h street vs pay_immediate
lots. Public reads; writes require the admin bearer token (timing-safe compare).
@fastify/rate-limit (120/min global, 20/min writes), manual IP denylist +
auto-block on repeated auth failures. SQLite via better-sqlite3. Dockerfile +
compose (loopback-only, mem/cpu capped) + nginx block + README. 9 tests pass.

Deployed live at https://bigbrainparking.mowden.top (behind nginx + certbot).
Not an npm workspace — kept out of the app/CI install to avoid the native dep.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-24 18:09:03 +00:00

25 lines
952 B
Text

# nginx reverse proxy for the zone-labels API.
# Install: sudo cp this file to /etc/nginx/sites-available/bigbrainparking.mowden.top
# sudo ln -s ../sites-available/bigbrainparking.mowden.top /etc/nginx/sites-enabled/
# sudo nginx -t && sudo systemctl reload nginx
# TLS: sudo certbot --nginx -d bigbrainparking.mowden.top
# (certbot rewrites this file to add the :443 server block + HTTP->HTTPS redirect.)
server {
listen 80;
listen [::]:80;
server_name bigbrainparking.mowden.top;
# Small API; cap request bodies.
client_max_body_size 32k;
location / {
proxy_pass http://127.0.0.1:8097;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 30s;
}
}