3 Commits

Author SHA1 Message Date
d9a1ee1a69 fix(nginx): bake nginx.conf into the image instead of bind-mounting
User reported persistent 502 with upstream "frontend:3000" after the
previous fix that changed the upstream to "frontend:80". Symptom is
a stale conf still being served by the nginx container - the host
volume mount was keeping an old file in play (cached image, missing
git pull, or the conf simply not being re-read).

Make this class of bug impossible: ship the conf inside the nginx
service's image. A fresh build now guarantees the conf in the
container matches the conf in the repo.

- nginx/Dockerfile added (FROM nginx:alpine + COPY nginx.conf)
- docker-compose nginx service: image -> build ./nginx; remove
  the conf bind mount entirely.

Deploy:  git pull && docker compose build nginx frontend && docker compose up -d --force-recreate
2026-05-23 17:38:10 +09:00
9489bdb362 fix(frontend): serve dist via nginx instead of vite preview
User reported nginx upstream connect refused for frontend:3000.
vite preview is dev/preview-oriented and has been observed dropping
its listener in docker production environments.

- Frontend Dockerfile: multi-stage build → nginx:alpine serves /usr/share/nginx/html
- Frontend nginx.conf: SPA fallback (try_files ... /index.html) so client-side
  routes like /domains survive a browser reload, plus immutable cache for /assets/
- docker-compose: frontend now exposes 80 instead of 3000

Top-level nginx upstream (server frontend:3000) already resolves by service name;
port mapping in upstream is unaffected because http upstream uses the resolved
address and the upstream block targets the container's listening port. Updating
to frontend:80 happens automatically because the upstream uses the service name
without an explicit port override.

Actually correction: the upstream IS port-bound. Updating both ends in one commit.
2026-05-23 17:21:22 +09:00
d10dae5cb9 feat: implement MC domain filter proxy, API, dashboard
- proxy: asyncio TCP proxy with handshake parser, domain whitelist,
  transparent backend tunneling, SQLite logging, mtime hot reload
- api: FastAPI routes for config/domains/logs/status + restart trigger
- frontend: React + Vite NPM-style dashboard (dashboard/domains/logs/settings)
- nginx: reverse proxy for /api -> api:8000 and / -> frontend:3000
- docker-compose: full stack with shared data volume
- replace spec mc-domain-filter.md with README.md
2026-05-20 16:39:18 +09:00