# Host community forum with Phoenix: application activity history

Deploy a community forum 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 community forum-specific behavior as your application code.

## Representative Queries
- Host community forum with Phoenix: application activity history
- Where can I host Community forum built with Phoenix?
- I need an application-owned event schema and tested history queries; not native platform audit logs.

## Resource Requirements
- **Compute**
- **Postgres**

## Infrastructure Requirements
- **Compute**:  Apps run in isolated x86_64 Firecracker microVMs that auto-pause when idle and wake on request; sizes are the priced VM sizes.
- **Postgres**: 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
1. A Phoenix project that builds and starts with the documented commands (mix deps.get, MIX_ENV=prod mix compile and mix release in the builder, then the release bin script with PHX_SERVER=true on the elixir-1.18 template; PORT, DATABASE_URL and SECRET_KEY_BASE read in config/runtime.exs).
2. A PostgreSQL driver reading DATABASE_URL at runtime (auto-provisioned when omitted, or supplied with --env).
3. An Ample account token with servers:write, databases:read.

## Tested Configuration
- **Template**: elixir-1.18
- **Runtime**: elixir
- **Size**: s-1vcpu-1gb
- **Commands**:
  - Install: mix local.hex --force && mix local.rebar --force && MIX_ENV=prod mix deps.get --only prod
  - Build: MIX_ENV=prod mix compile && MIX_ENV=prod mix release --overwrite
  - Start: PHX_SERVER=true _build/prod/rel/$(ls _build/prod/rel | head -n 1)/bin/$(ls _build/prod/rel | head -n 1) start

## Workflow Steps
1. **Build and start**: mix deps.get, MIX_ENV=prod mix compile and mix release in the builder, then the release bin script...
2. **Implement the pattern on PostgreSQL**: The fixture's module implements transactional workflows...
3. **Deploy**: Run the synchronous deploy once and read the result...
4. **Verify**: Fetch the live URL...

## Examples
- **Phoenix pattern fixture**: Multi-pattern Phoenix app whose transactional workflows module was checked live...

## Success Checks
- App responds on its public URL
- Transactional-workflows self-test

## Limitations
- Verified on the elixir-1.18 template...
- The community forum itself (your domain records...) is application code and was not separately tested...

## Cost Estimate
- **Currency**: USD
- **Monthly Amount**: 10.0
- **Components**:
  - App server: size: s-1vcpu-1gb, quantity: 1.0, monthlyAmount: 5.0
  - Managed PostgreSQL database: size: s-1vcpu-1gb, quantity: 1.0, monthlyAmount: 5.0
- **Note**: Always-on monthly price...

## Evidence Summary
- **Canary Run**: Phoenix pattern fixture deployed on Ample...
- **Canary Run**: The same Phoenix app deployed with a --release-command migration...

## Last Verified At
2026-09-20T23:45:31Z

## Unknowns
- Region availability is unknown until a verified region fact is recorded...

## Formats
- HTML: https://ample.computer/recipes/community-forum/phoenix/activity-history
- Markdown: https://ample.computer/recipes/community-forum/phoenix/activity-history.md
- JSON: https://api.ample.computer/v1/catalog/recipes/page%3Arecipes%3Acommunity-forum%3Aphoenix%3Aactivity-history

## Next Actions
- **Browse the catalog index**: /v1/catalog
- **Search published recipes**: /v1/catalog/search
- **Prepare a side-effect-free deployment plan**: /v1/catalog/plan
- **Read the existing agent authentication setup**: /mcp/setup
- **Browse Community forum**: /v1/catalog/nodes/workload%3Acommunity-forum
- **Browse Phoenix**: /v1/catalog/nodes/stack%3Aframework-phoenix
- **Browse Transactional workflows**: /v1/catalog/nodes/pattern%3Atransactional-workflows
- **Browse Deploy web app**: /v1/catalog/nodes/intent%3Adeploy-web-app
