page:recipes:order tracking:phoenix:relational catalog

Host Order Tracking with Phoenix: Relational Catalog Data

Deploy an order tracking built with Phoenix on Ample using the transactional workflows pattern. Compute runs the app in an isolated microVM behind a public HTTPS URL, a managed PostgreSQL 16 database is auto-provisioned and injected as DATABASE_URL. Verified on Phoenix: an optimistic version check and an event row written in the same transaction, a stale update rejected, and a history query over the application-owned events (history=2 conflict=rejected). Not separately tested: your domain records, validation rules and concurrency policy; treat the order tracking-specific behavior as your application code.

Representative Queries

Resource Requirements

Infrastructure Requirements

  1. Compute
    • Status: verified
    • Summary: Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
  2. Postgres
    • Status: verified
    • Summary: Managed PostgreSQL 16 runs in its own microVM and is auto-provisioned when an app needs a database and no DATABASE_URL is supplied.

Prerequisites

Workflow Steps

  1. Build and Start
    • mix deps.get, MIX_ENV=prod mix compile and mix release in the builder.
    • Run the release bin script with PHX_SERVER=true on the elixir-1.18 template.
  2. Implement the Pattern on PostgreSQL
    • The fixture's module implements transactional workflows: an optimistic version check and an event row written in the same transaction, a stale update rejected, and a history query over the application-owned events (history=2 conflict=rejected).
  3. Deploy
    • Command: ample deploy . --name <YourAppName> --public
  4. Verify
    • Command: ample logs --kind build

Cost Estimate

Limitations