Phoenix and Elixir
← Docs · Frameworks

Phoenix and Elixir

Deploy Phoenix with Postgres, ClickHouse or Redis, and migrations through the release.

  • Datastores from mix.exs: ecto_sql/postgrex → Postgres, ecto_ch/ch → ClickHouse, redix → Redis.
  • Migrations: mix ecto.migrate. Compiled releases have no mix at runtime, so Railyard finds the release wherever the image puts it and runs its migrator (bin/migrate if present, otherwise bin/<app> eval). mix phx.server becomes bin/<app> start the same way.
  • Variables read in config/runtime.exs (BASE_URL, HTTP_PORT, LISTEN_IP, DATABASE_URL, CLICKHOUSE_DATABASE_URL…) are wired automatically; SECRET_KEY_BASE is generated.
  • MIX_ENV=prod and PHX_SERVER=true are set.