رفتن به محتوا

انتشار و نگهداری شاپفی

این راهنما از بستهٔ همان محصول گردآوری شده است. برای تفاوت امکانات نصب محلی و قابلیت‌های عمومی، وضعیت نسخه را هم بخوانید. دستورها را با بستهٔ نسخه‌دار همان محصول اجرا کنید؛ این سایت شامل کلید یا دادهٔ خصوصی نصب نیست.

This standalone synthetic Cafe runs separately from the legacy Shopware pilot. Build and test on a development computer; do not build or run load tests on the shared production VPS. The approved web UI and native SQLite order journal are included in the image. No user profile, keys, ledger, or database is bundled.

  1. Build the Dockerfile and record the image/archive digest and source manifest. Run the Python tests and a fresh container checkout/replay/cancel smoke test.
  2. Load that image on the target. Set SHOPFEE_IMAGE to its inspected immutable image ID. Compose has pull_policy: never; it cannot substitute a remote tag.
  3. Create a private profile JSON (0600, UID10001), a separate persistent state directory (0700, UID10001), and an unused private /28 network. Set the profile origin to the exact HTTPS hostname and state_dir to /data.
  4. Provide Compose SHOPFEE_PROFILE_FILE, SHOPFEE_STATE_DIR, SHOPFEE_PORT, and SHOPFEE_SUBNET through a private environment file. Generate a fresh Fernet key; keep it with the private state backup, never in the release tree.
  5. For the first direct-checkout installation use wallet_enabled: false. It needs no IdP, Wallet, or Hub. Orders are synthetic, unpaid, pay-on-pickup; this does not provide physical fulfillment or a real payment gateway.
  6. Start the dedicated Compose project; inspect its health,192MiB memory cap, read-only root, non-root UID, and loopback-only port. Validate a new Caddy host with the supplied example, then reload Caddy. Preserve sibling sites.
  7. Verify DNS, HTTPS, served asset hashes and a real browser checkout on mobile and desktop. Confirm the same browser can reopen its order after refresh.

Enabling the optional Wallet branch is a separate release acceptance: provision an independent confidential OIDC client with exact callback and PKCE, a real synthetic merchant account, issuer and Wallet origin. Verify two owners, connection/approval, original-reference replay, native receipts, HELD vs PAID, and release-before-cancel. A passing local finance fixture is not public Google or merchant acceptance. Do not silently use the demo payee or reset an existing merchant pin/history to enable this branch. The Cafe assistant entry offers three choices: a brief explanation inside the Cafe, Personal Agent documentation, and direct navigation to Personal Agent in a separate tab. Documentation remains visibly unavailable until its public page exists. The brief view retains the documentation and direct-navigation choices. This entry does not submit a prompt or transfer a basket, account, key or payment authority. The optional merchant MCP purchase route below has separate acceptance.

Check /healthz, container health/restarts/OOM, bounded resource consumption, and public HTTPS after deployment. Access logs are disabled to keep OAuth query codes out of logs. Do not publish private order/customer references. Stop the new Cafe/revert only its new host route if errors prevent checkout, the profile or asset manifest mismatches, or sibling services regress. Keep persistent state.

An image rollback never authorizes restoring an old database over a later Wallet ledger. Back up all Cafe SQLite databases together with the service stopped and retain its private profile securely. Restore only after verifying schema and merchant/identity pins. Do not remove the shared VPS recovery swap or restart Wallet/Hub as part of this deployment.

Optional native Personal Agent purchase route

Section titled “Optional native Personal Agent purchase route”

This is a coordinated release of Shopfee, Personal Agent and independent Wallet. The code being present does not establish public acceptance. Keep commerce off until reviewed images, operator configuration and the complete owner flow pass. The existing direct Cafe checkout must remain usable.

  • Shopfee: set commerce_enabled: true, exact issuer, wallet_origin, personal_agent_origin, a genuinely onboarded and verified payee_account, merchant_name, private Ed25519 PEM quote_signing_key, pinned Ed25519 PEM wallet_receipt_public_key, and the confidential introspection service client’s merchant_oauth_client_id / merchant_oauth_client_secret.
  • wallet_enabled controls the older web Wallet checkout branch separately. Merchant MCP commerce does not require enabling that branch. If it is enabled, retain its separately configured confidential web client and acceptance.
  • Personal Agent: add the five public purchase fields described in its connection guide. Its merchant and Wallet connections use separate public PKCE clients and exact callbacks. Neither receives wallet.owner. Both service tokens must identify the same buyer in the configured purchase issuer.
  • Wallet: register the Personal Agent Wallet OAuth client in purchase_clients, pin the Shopfee origin/name/payee/quote public key in purchase_merchants, and configure its private purchase_receipt_signing_key. See the Wallet guide. OAuth does not create an owner Authority connection or grant; the owner explicitly connects that client in Wallet.

Generate signing keys only in the private destination installation, retain them across restarts and back them up securely. Exchange public keys only. Keep the existing Personal Agent application encryption keys, Mongo volumes and OAuth storage; regenerating those keys is not an upgrade. Never import fixture owners, issuer keys, credentials, data or relay settings into production. Provision the merchant recipient using Wallet’s real onboarding/binding flow; direct SQL or an unverified Blnk ID is not account ownership proof.

bln_shopfee-demo cannot receive payments. An existing Cafe/Orders database pair pinned to that placeholder needs the explicit offline tool; changing only the profile or deleting identity rows is unsafe.

  1. Gate public writes and stop Shopfee. Record its old profile and image and take coordinated private backups of both cafe.db and orders.db. Check that there are no unresolved financial operations. Prove the new recipient binding separately before mutation.
  2. Use the reviewed new image/tool against those two stopped, existing databases. Both must already use persistent DELETE journals. The tool rejects financial history, unresolved operations, mismatched identities and real-account rotations.
Terminal window
python -B migrate_payee.py --cafe-db /data/cafe.db --orders-db /data/orders.db \
--expected-old-payee bln_shopfee-demo --new-payee "$SHOPFEE_BOUND_PAYEE"
  1. Set the private profile to that verified destination and start the reviewed image while traffic remains gated. Check that old receipts/digests and stock are unchanged. Old receipts keep their original payee snapshot; they cannot be newly charged to the changed destination.
  2. Before admitting new writes, rollback requires the coordinated pair of old databases, old profile and old image. Once any new writes have been admitted, use a forward fix; never restore stale order/stock databases over newer state.

Test the real native Personal Agent and independent services with synthetic funds. Record image IDs and served-source parity separately from test results.

  • Both OAuth callbacks, owner/client isolation, explicit Wallet connection, remembered credentials and ordinary checkout/history after restart.
  • Available and unavailable menu items, cap rejection and a successful new order afterwards; authoritative stock and exact item/quantity/amount/payee snapshot.
  • Native owner review, Wallet owner approval, reservation, and final owner commit in Wallet. A spending grant must not bypass either purchase approval or final owner accounting. No paid merchant receipt before the signed POSTED outcome.
  • Duplicate clicks, response loss, restart and original-reference recovery. UNKNOWN must stay recovery-only; cancellation/restock requires a safe terminal outcome.
  • Decline, expiry, reserved release and cancellation replay; no second debit, duplicate order or duplicate restock. Check mobile and desktop controls/layout.

During release, record the target containers and sibling service identities, coordinated checkpoints, image/profile hashes and health checks. Keep traffic restricted until authenticated acceptance and served-byte verification complete. Watch authentication failures, new UNKNOWN/review states, receipt mismatches, checkout errors and resource/OOM signals against the pre-release baseline. Unexpected accounting or receipt mismatch stops enablement and requires original- reference recovery; a switch to an older image does not undo a ledger entry.