Commit Graph

4 Commits

Author SHA1 Message Date
danamir
773dbb493e Add production deployment guide and harden compose for it
Some checks failed
CI/CD / build-test-deploy (push) Has been cancelled
- docker-compose.yml: bind client/server ports to 127.0.0.1 only — the
  client container is the sole intended public entry point (it proxies
  /api/* to the server itself), a host-level nginx sits in front of it in
  production. Client__Origin now configurable via CLIENT_ORIGIN env var.
- docs/DEPLOY.md: step-by-step for a fresh Linux target (Docker install,
  clone, .env secrets, nginx + certbot).
- docs/CI-CD.md: runner registration for that same target machine, in
  "host" mode so the deploy step's `docker compose up -d` acts on the
  actual running stack.
2026-08-06 14:18:22 +03:00
danamir
dfbc43a43e Make client API calls relative instead of hardcoded localhost:5144
Some checks failed
CI/CD / build-test-deploy (push) Has been cancelled
The client always called a hardcoded http://localhost:5144, which only
worked when browser and server shared the same "localhost" — breaks for
any real remote deployment, since the browser would try to reach that
port on the visitor's own machine instead of the actual server.

Now every environment routes /api/* to the server under the same origin
the page was loaded from, so the client code needs no per-environment URL:
- Docker (client container's own nginx) proxies /api/ to the server
  container.
- `npm run dev` (Vite) proxies /api to localhost:5144 via server.proxy.
- Production nginx (reverse proxy + TLS) just needs to forward everything
  to the client container, which already knows how to route /api itself.

Also incidentally removes CORS from the picture everywhere, since none of
these setups make a cross-origin request anymore.
2026-08-06 14:15:15 +03:00
danamir
74497fa747 Add Gitea Actions CI/CD workflow
Some checks failed
CI/CD / build-test-deploy (push) Has been cancelled
On every push/PR: run Domain.Tests, then docker compose build to validate
the full stack still builds. On push to master: also docker compose up -d
to redeploy. COMPOSE_PROJECT_NAME is pinned to ruvdstests so a run from a
runner-managed checkout always targets the existing stack/volumes instead
of spinning up a duplicate under a different project name.
2026-08-06 13:57:57 +03:00
danamir
942dfc9c1a Initial commit: standalone quiz-testing system
Full-stack F# (Domain/Server/Client via Fable+Elmish+Feliz), PostgreSQL
persistence via Dapper, Docker Compose deployment. Student quiz-taking flow
with time-limit enforcement and focus-loss tracking, Teacher question bank
and quiz builder with results analytics, Admin user management.
2026-08-06 12:36:16 +03:00