Can make a bundle with Elixir, Erlang VM, and code that you can drop on a prod machine/docker container and run.
Gen
mix phx.gen.release apparently needed for something like running migrations in the release idk its in the guide
# Initial setup
mix deps.get --only prod
MIX_ENV=prod mix compile
# Compile assets
npm install --prefix ./assets
npm run deploy --prefix ./assets
mix phx.digest
# Build the release and overwrite the existing release directory
MIX_ENV=prod mix release --overwrite
Then using this built release
# Running
_build/prod/rel/react_phoenix/bin/react_phoenix start
# All commands
_build/prod/rel/react_phoenix/bin/react_phoenix
# Accessing while running(after ssh?)
_build/prod/rel/react_phoenix/bin/react_phoenix remote
Need 2 buildpacks, config the version of elixir and erlang, configure config.exs
heroku create --buildpack hashnuke/elixir #will return url to use in prod
heroku buildpacks:add https://github.com/gjaldon/heroku-buildpack-phoenix-static.git