EnergyVenom's picture
Deploy Patchwise: new name and mark, account pages with the 3D hero and beUI form (React 19, Tailwind 4 alongside Mantine)
8f175f6 verified
|
Raw History Blame Contribute Delete
7.42 kB

Deploying Patchwise in a customer's cloud

One deployment serves one customer. Everything the product stores stays on the customer's own server, in Docker volumes: nothing is kept outside their environment.

Status of this package. The application image is built and checked automatically on every push to main (.github/workflows/image.yml): it starts, serves the web app, the practice pod answers, sign-in works, and the self-tests pass inside the container (35 checks offline, 42 with three scenarios in Chromium). Image size: 1.8 GB. Not yet run: the full docker compose stack in this folder (the application together with Temporal and the HTTPS proxy). The compose file passes docker compose config; run "Verify" on a staging server before the first customer install.

What gets installed

Container What it does Reachable from
app Web app, API, workflow worker, test browser (Chromium), practice pod only through the proxy
temporal Keeps long test runs alive across restarts the app; its UI on the server's loopback only
proxy (Caddy) HTTPS on ports 80 and 443 the customer's users
Volume Contents
fpt-data Database, secrets vault, encrypted evidence, reports, script library
temporal-data Workflow history
caddy-data TLS certificates

Server

  • A Linux VM with Docker Engine 24+ and the compose plugin. AWS EC2, Azure VM and Google Compute Engine all work.
  • Size: 4 vCPU, 8 GB RAM, 50 GB disk for the product. A local AI model needs its own GPU server (24 GB GPU).
  • Network: inbound 443 (and 80 for the certificate) from the customer's users only. No other inbound port.
  • Outbound: nothing is required. Allow https://docs.oracle.com only if live release-note research is switched on, and the external AI provider's address only if an external model is configured.

Install

# on the server, in the folder that holds the product files
cd deploy
cp .env.example .env
nano .env                    # set FPT_DOMAIN, FPT_TLS, the first admin and a long password
docker compose build         # or: docker load < patch-coworker-1.0.0.tar  when shipping a pre-built image
docker compose up -d
docker compose ps            # all three should be "running"; app becomes "healthy" within a minute

Open https://<FPT_DOMAIN> and sign in as the first admin. Then, in the product:

  1. Settings > Users: create named accounts (consultant, QA approver, viewer) and change the admin password.
  2. Test environments: check the pod. A fresh install has the practice pod only.
  3. Settings > AI models: optional. Connect a local model and, if the customer agrees, an external one.

FPT_TLS=internal gives a certificate from Caddy's own authority, which browsers do not trust until the customer installs Caddy's root certificate. For a public certificate set FPT_TLS to an e-mail address; the domain must then resolve to the server and port 80 must be reachable from the internet.

Verify (do this on staging before a customer install)

docker compose exec app curl -fsS http://127.0.0.1:8800/api/ready        # "ready": true, orchestrator temporal
docker compose exec app python -m coworker selftest                      # 35 checks, offline
docker compose exec app python -m coworker selftest --live               # runs 3 scenarios in Chromium
docker compose logs app | tail -50

Then in the browser: start a full run in a real browser on Procure-to-Pay, approve the scenarios, open the Live view, and download the report and the Excel test script.

Day-to-day

Task Command
Stop / start docker compose stop / docker compose up -d
Logs docker compose logs -f app
Backup ./backup.sh /secure/backups (the archive includes the secrets vault: keep it encrypted)
Upgrade take a backup, load or build the new image, docker compose up -d (database upgrades run on start)
Temporal UI ssh -L 8233:127.0.0.1:8233 <server> then open http://127.0.0.1:8233
Emergency stop in the product: Settings > Emergency stop, or docker compose exec app python -m coworker kill
Check the audit log docker compose exec app python -m coworker verify-audit

Security checklist for the customer's team

  • Only 443 (and 80) are open, and only to the customer's users.
  • The first admin password was changed and named accounts are in use.
  • .env and the backups are readable by administrators only.
  • The server disk is encrypted (the evidence store is encrypted by the product; the database and reports are not).
  • Backups run on a schedule and a restore has been tried once.
  • If an external AI model is connected: the customer has agreed to it, and the provider's data-retention terms are known.

What this deployment does not include

These are the limits of the product today, not of the packaging. Say them plainly to a buyer.

  • Oracle Fusion coverage is Payables only. Runs on a registered Fusion test pod work end to end for Payables (verified on a real pod on 31 Oct 2026: 6 of 6 scenarios in the browser). Other business areas run on the practice pod only until their Fusion scripts are written and verified.
  • Single sign-on (SAML/OIDC) is not built; accounts are local or come from Supabase.
  • SQLite and a single-node Temporal dev server. Fine for one customer on one server; not highly available.
  • Jira / ServiceNow: tickets are written to files; the connectors are stubs.
  • Windows desktop app: the installer is not code-signed.
  • Updates and licensing: there is no licence check, update channel or usage metering.
  • No independent security test (penetration test) has been done.

Settings that make the demo survive a restart (Hugging Face Space or any host without a disk)

The app keeps its data in an encrypted snapshot in Supabase Storage and restores it at start. These settings rebuild the essentials from the environment, so a lost or unreadable snapshot never leaves the product without its pod or its AI model.

Setting Kind Effect
FPT_FUSION_BASE_URL (https://<pod>.fa.ocs.oraclecloud.com), FPT_FUSION_NAME, FPT_FUSION_ENVIRONMENT, FPT_FUSION_MODULES variable The Oracle Fusion test pod exists after every start. Production addresses are refused.
FPT_SECRET_FUSION_USERNAME, FPT_SECRET_FUSION_PASSWORD secret The pod's test user. Never written to the vault file or shown.
FRONTIER_BASE_URL (https), FRONTIER_MODEL, FPT_SECRET_FRONTIER_API_KEY variable, variable, secret The external model is switched on at start when no AI settings are saved in the app. FPT_FRONTIER_AUTO=0 turns this off.
SUPABASE_BUCKET, SUPABASE_URL, SUPABASE_SERVICE_KEY, FPT_STATE_KEY variable and secrets One bucket per deployment; never share a bucket between two instances (the last writer wins).

If the start-up restore fails, the instance starts empty and stops saving (/api/ready shows saved_state.paused, and the app shows a notice) so the good snapshot is not overwritten; restart to retry. The first save of every start keeps the archive it found as state/previous.bin in the bucket; copy it over state/latest.bin to undo a bad save.