Requirements
- Elixir 1.20 (OTP 28) installed locally
- Account on Vertra Cloud
- A project with a
mix.exsat the root
Project Structure
mix.exs. It runs mix deps.get and compiles with MIX_ENV=prod. It starts the app with mix run --no-halt, or with mix phx.server when the project depends on :phoenix.
Configuration
vertracloud.config
MAIN is mix.exs.
Phoenix
Phoenix is supported. Set these variables under Environment:
In
config/runtime.exs, bind to all interfaces and read the port from the environment:
Example: Plug Server
Deploy
- Dashboard
- CLI
- VS Code
- Compress the project into a
.zipor push it to GitHub. - In the dashboard, click New Project and upload the
.zipor paste the repository URL. - In Build, check the runtime (Elixir), the main file (
mix.exs) and the memory. Start and build commands are under Advanced settings. - Add your environment variables in Environment.
- In Network, turn on web publishing so the app gets a
*.vertraweb.appaddress (Pro plan or higher, 512 MB of memory). The app must listen on port 80. - Review and deploy. Follow the output in the Logs tab.
Available Versions
Notes
- Build: dependencies and compilation run during deployment with
MIX_ENV=prod - Exclude from the zip:
_buildanddepsfolders - Environment variables: read them in
config/runtime.exswithSystem.get_env/1 - Logging: use
Loggerfor logs that appear in real time - Listen on
0.0.0.0on port 80
Common Errors
SECRET_KEY_BASEorPHX_HOSTis missing: a Phoenix app fails to boot without them. Add both under Environment and restart.- Phoenix assets missing: run
mix assets.deploybefore zipping, or use a project without assets. - Site doesn’t open: the endpoint must bind to
0.0.0.0and port 80, not127.0.0.1or 4000.