{"catalogRevision":"cat_f13ab9a494120b5e","recipeId":"page:guides:phoenix:build-and-start","recipeRevision":"r1","canonicalPath":"/guides/phoenix/build-and-start","label":"Configure build and start for Phoenix","family":"Framework operation","summary":"Build and start for a Phoenix app on Ample. Verified on Phoenix: the app built and started with the documented commands and answered on its public HTTPS URL. Build and start: 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.","representativeQueries":["Configure build and start for Phoenix","Where can I host Configure build and start built with Phoenix?","I need pinned build/start commands, port binding and a tested process lifecycle."],"breadcrumbIds":["discovery","stack","stack:frameworks","stack:framework-phoenix","page:guides:phoenix:build-and-start"],"breadcrumbs":[{"id":"discovery","label":"Agent hosting discovery","canonicalPath":"/discover/discovery","kind":"root"},{"id":"stack","label":"Frameworks and execution targets","canonicalPath":"/discover/stack","kind":"facet"},{"id":"stack:frameworks","label":"Frameworks","canonicalPath":"/discover/stack/frameworks","kind":"group"},{"id":"stack:framework-phoenix","label":"Phoenix","canonicalPath":"/discover/stack/framework-phoenix","kind":"atom"},{"id":"page:guides:phoenix:build-and-start","label":"Configure build and start for Phoenix","canonicalPath":"/guides/phoenix/build-and-start","kind":"recipe"}],"parentIds":["stack:framework-phoenix","intent:configure-deployment","pattern:public-web-service"],"parents":[{"id":"stack:framework-phoenix","label":"Phoenix","canonicalPath":"/discover/stack/framework-phoenix","kind":"atom"},{"id":"intent:configure-deployment","label":"Configure deployment","canonicalPath":"/discover/intent/configure-deployment","kind":"atom"},{"id":"pattern:public-web-service","label":"Public web service","canonicalPath":"/discover/pattern/public-web-service","kind":"atom"}],"resourceRequirements":["primitive:compute"],"infrastructureRequirements":[{"primitiveId":"primitive:compute","label":"Compute","canonicalPath":"/discover/primitive/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."}],"framework":"Phoenix","workload":"Configure build and start","releaseStatus":"published","supportStatus":"verified","executionStatus":"ready","docsOnly":false,"prerequisites":["A Phoenix project (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)","An Ample account token with servers:write"],"testedConfiguration":{"template":"elixir-1.18","runtime":"elixir","size":"s-1vcpu-1gb","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"},"inputSchema":{"additionalProperties":false,"properties":{"env":{"description":"Encrypted environment variables","items":{"pattern":"^[A-Z][A-Z0-9_]*=.*$","type":"string"},"maxItems":50,"type":"array"},"name":{"description":"App name","maxLength":63,"minLength":1,"pattern":"^[a-z0-9-]+$","type":"string"},"path":{"description":"Project directory or ample.toml service","maxLength":512,"minLength":1,"type":"string"},"release_command":{"description":"Migration command run before activation","maxLength":512,"type":"string"}},"required":["name","path"],"type":"object"},"outputSchema":null,"workflowSteps":[{"title":"Build and start","body":"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; the server must bind 0.0.0.0 on PORT."},{"title":"Deploy","body":"Run the synchronous deploy once and read the result.","command":"ample deploy . --name <app-name> --public"},{"title":"Verify","body":"Fetch the live URL on the example; on failure read the build and runtime logs.","command":"ample logs <deployment_id> --kind build"}],"examples":[{"title":"Phoenix pattern fixture","description":"Verified build and start on Phoenix.","sourceRef":"tests/deploy-canaries/phoenix-patterns"}],"successChecks":[{"description":"app responds on its public URL","kind":"http_get","path":"/","expect":"ample canary phoenix patterns"}],"limitations":["Verified on the elixir-1.18 template at s-1vcpu-1gb; other sizes and Phoenix major versions are not verified.","Region, compliance attestations and request-duration limits are unknown and not claimed."],"costEstimate":{"currency":"USD","monthlyAmount":5.0,"authoritative":true,"basis":"size prices from pricing.toml (loaded by the API) at build revision 752d2a7584688a5d233b2c53d38307d289b04d3e","components":[{"name":"app server","size":"s-1vcpu-1gb","quantity":1.0,"monthlyAmount":5.0}],"note":"Always-on monthly price of the tested sizes; apps auto-pause when idle. Buckets are allocation-priced per quota and not included."},"evidenceSummary":[{"kind":"canary_run","summary":"Phoenix pattern fixture deployed on Ample (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); for this guide: the app built and started with the documented commands and answered on its public HTTPS URL.","observedAt":"2026-09-20T23:45:31Z","implementationRevision":"4d1511e574302f3904b75088bd4048a0975218b3 (CLI 0.1.21)","expiresAt":"2027-03-19T23:45:31Z","scope":{"checks":[],"template":"elixir-1.18"}}],"lastVerifiedAt":"2026-09-20T23:45:31Z","mcpBinding":{"registryRef":"mcp:ample_deploy","toolName":"ample_deploy","schemaHash":"876465fce906da0c224d62961d3343064108ebe30af80cf1b87094974e948853","observedAt":"2026-09-22T00:31:22.774679+00:00","implementationRevision":"e6446ceea69b","requiredScopes":["servers:write"],"bindingState":"current"},"unknowns":["region availability is unknown until a verified region fact is recorded","compliance attestations are unknown; none are claimed"],"formats":{"html":"https://ample.computer/guides/phoenix/build-and-start","markdown":"https://ample.computer/guides/phoenix/build-and-start.md","json":"https://api.ample.computer/v1/catalog/recipes/page%3Aguides%3Aphoenix%3Abuild-and-start"},"nextActions":[{"actionId":"browse-catalog","label":"Browse the catalog index","operationId":"catalog_index","method":"GET","relativePath":"/v1/catalog","origin":"api","parameters":{},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"search-recipes","label":"Search published recipes by intent, stack and constraints","operationId":"search_recipes","method":"POST","relativePath":"/v1/catalog/search","origin":"api","parameters":{"body":{"limit":5,"query":"Configure build and start for Phoenix"}},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"plan:page:guides:phoenix:build-and-start","label":"Prepare a side-effect-free deployment plan for an authorized project","operationId":"plan_deployment","method":"POST","relativePath":"/v1/catalog/plan","origin":"api","parameters":{"body":{"inputs":{},"projectId":"<workspace or server id you own>","recipeId":"page:guides:phoenix:build-and-start","recipeRevision":"r1"}},"requiresAuthentication":true,"requiresApproval":false},{"actionId":"auth-setup","label":"Read the existing agent authentication setup","operationId":"existing_auth_setup","method":"GET","relativePath":"/mcp/setup","origin":"api","parameters":{},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:stack:framework-phoenix","label":"Browse Phoenix","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/stack%3Aframework-phoenix","origin":"api","parameters":{"nodeId":"stack:framework-phoenix"},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:intent:configure-deployment","label":"Browse Configure deployment","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/intent%3Aconfigure-deployment","origin":"api","parameters":{"nodeId":"intent:configure-deployment"},"requiresAuthentication":false,"requiresApproval":false},{"actionId":"browse:pattern:public-web-service","label":"Browse Public web service","operationId":"browse_node","method":"GET","relativePath":"/v1/catalog/nodes/pattern%3Apublic-web-service","origin":"api","parameters":{"nodeId":"pattern:public-web-service"},"requiresAuthentication":false,"requiresApproval":false}]}