Repository navigation
Conversation
Adds deploy/demo: a Compose stack that runs migrations, seeds demo users and synthetic transactions, and serves the SPA and API from one TLS origin via Caddy. Documented in docs/operations/demo-deploy.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011nV6JKZGYFFoLk7YRGPYia
setup-host.sh installs Docker, opens 80/443 in the host firewall, generates demo.env with random secrets, and starts the stack. The guide covers the Oracle VM, cloud firewall and an sslip.io hostname. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011nV6JKZGYFFoLk7YRGPYia
Passes OUTBOX_POLL_INTERVAL and WS_MAX_CONNECTIONS_PER_USER through to the demo api, and has setup-host.sh install a cron that ingests small synthetic batches every two minutes plus a nightly reset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011nV6JKZGYFFoLk7YRGPYia
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Viko · project thread
Summary
Adds
deploy/demo/, a Docker Compose stack for running a public FinWatch demo on one small host, plusdocs/operations/demo-deploy.md. Onupit applies migrations, creates the demo operator/admin users, and ingests synthetic transactions (which raise alerts). It serves the SPA at/and the API at/api/*(WebSocket at/api/ws) from one TLS origin via Caddy.setup-host.shprepares a fresh Ubuntu VM (targeting Oracle Cloud Always Free): it installs Docker, opens 80/443 in iptables, generates random secrets, starts the stack, and installs a cron that ingests 10 transactions every 2 minutes plus a nightly reset.Closes #77
Architecture summary
apps/apiandapps/webDockerfiles, which are multi-arch, so the stack also runs on arm64.service_completed_successfully:migrate(golang-migrate) →seed-users→seed/api.handle_path /api/*strips the prefix, so API routes match the OpenAPI contract. Serving everything from one origin keeps CORS and WebSocket origin checks simple.mainafter feat: transactional outbox relay and in-process WebSocket hub #65/feat(web): Dashboard and Alerts pages backed by live data #67/feat(api): enforce RBAC with admin-only rule management #69/feat(web): Rules page with admin-only enable/disable toggle #71/feat(api): cap concurrent WebSocket connections per user #73. PassesOUTBOX_POLL_INTERVALandWS_MAX_CONNECTIONS_PER_USERthrough to the API.Security considerations
APP_ENV=production: the API refuses the published example JWT secret and the dev fallback demo passwords.demo.envis git-ignored andsetup-host.shcreates it with mode 600 and random secrets.Testing evidence
I ran the stack locally against current
mainwithDEMO_DOMAIN=demo.localhost, using Caddy's internal TLS:I also ran
setup-host.shin an Ubuntu 24.04 container with docker, apt, and systemctl stubbed. The iptables rules are inserted ahead of REJECT and stay idempotent on re-run,demo.envis created with mode 600 and is kept on re-run, and the cron file is written. The apt candidatesdocker.ioanddocker-compose-v2exist on Ubuntu 22.04 and 24.04.Known limitations
Follow-up issues