page:guides:phoenix:build and start

Configure build and start for Phoenix

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.

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 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.

  2. Deploy
    Run the synchronous deploy once and read the result.
    Command: ample deploy . --name <your-app-name> --public

  3. Verify
    Fetch the live URL on the example; on failure read the build and runtime logs.
    Command: ample logs <your-app-name> --kind build

Prerequisites

Success Checks

Limitations

Cost Estimate

Examples

Evidence Summary