Skip to content

Latest commit

 

History

History

elixir

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Deploying an Elixir App on Flux Network with Deploy With Git

This is a minimal Elixir/OTP HTTP app ready to deploy on Flux Network using Deploy With Git.

How Flux Detects This App

Flux identifies Elixir projects by mix.exs. It then:

  1. Reads Elixir and Erlang/OTP versions from .tool-versions
  2. Installs production dependencies with MIX_ENV=prod mix deps.get --only prod
  3. Compiles the project and creates a production release with mix release
  4. Starts the generated release in the foreground

The server binds to 0.0.0.0 and reads the port from PORT, as required by Flux. This sample has no third-party dependencies.

Deploy

Deploy on Flux

Or configure it manually:

  1. Go to orbit.app.runonflux.io.
  2. Select this repository, the master branch, and project path elixir.
  3. Select the free plan and set the application port to 8080.
  4. Review and register the app.

The app will be available at a URL like https://YOUR-APP-NAME.app.runonflux.com.

Configuration

Variable Description Default
PORT Port and interface used by the HTTP server 8080
ELIXIR_VERSION Overrides the Elixir version in .tool-versions 1.20.2
OTP_VERSION Overrides the Erlang/OTP version in .tool-versions 28.4
BUILD_COMMAND Overrides the automatic Mix build and release —
RUN_COMMAND Overrides production release startup —

Set the Flux application port to the same value as PORT. Orbit also exports MIX_ENV=prod automatically.

Run Locally

mix run --no-halt

Open http://localhost:8080. The health endpoint is http://localhost:8080/health.

Resources