انتشار و نگهداری شاپفی
این راهنما از بستهٔ همان محصول گردآوری شده است. برای تفاوت امکانات نصب محلی و قابلیتهای عمومی، وضعیت نسخه را هم بخوانید. دستورها را با بستهٔ نسخهدار همان محصول اجرا کنید؛ این سایت شامل کلید یا دادهٔ خصوصی نصب نیست.
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.
Install
Section titled “Install”- 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.
- Load that image on the target. Set
SHOPFEE_IMAGEto its inspected immutable image ID. Compose haspull_policy: never; it cannot substitute a remote tag. - Create a private profile JSON (0600, UID10001), a separate persistent state
directory (0700, UID10001), and an unused private /28 network. Set the profile
originto the exact HTTPS hostname andstate_dirto/data. - Provide Compose
SHOPFEE_PROFILE_FILE,SHOPFEE_STATE_DIR,SHOPFEE_PORT, andSHOPFEE_SUBNETthrough a private environment file. Generate a fresh Fernet key; keep it with the private state backup, never in the release tree. - 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. - 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.
- 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.
Observe and recover
Section titled “Observe and recover”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, exactissuer,wallet_origin,personal_agent_origin, a genuinely onboarded and verifiedpayee_account,merchant_name, private Ed25519 PEMquote_signing_key, pinned Ed25519 PEMwallet_receipt_public_key, and the confidential introspection service client’smerchant_oauth_client_id/merchant_oauth_client_secret. wallet_enabledcontrols 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
purchasefields described in its connection guide. Its merchant and Wallet connections use separate public PKCE clients and exact callbacks. Neither receiveswallet.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 inpurchase_merchants, and configure its privatepurchase_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.
Existing placeholder payee
Section titled “Existing placeholder payee”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.
- Gate public writes and stop Shopfee. Record its old profile and image and take
coordinated private backups of both
cafe.dbandorders.db. Check that there are no unresolved financial operations. Prove the new recipient binding separately before mutation. - 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.
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"- 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.
- 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.
Acceptance before public enablement
Section titled “Acceptance before public enablement”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.