View Source mix phx.gen.release (Phoenix v1.6.16)

Generates release files and optional Dockerfile for release-based deployments.

The following release files are created:

  • lib/app_name/release.ex - A release module containing tasks for running migrations inside a release

  • rel/overlays/bin/migrate - A migrate script for conveniently invoking the release system migrations

  • rel/overlays/bin/server - A server script for conveniently invoking the release system with environment variables to start the phoenix web server

Note, the rel/overlays directory is copied into the release build by default when running mix release.

To skip generating the migration-related files, use the --no-ecto flag. To force these migration-related files to be generated, the use --ecto flag.

docker

Docker

When the --docker flag is passed, the following docker files are generated:

  • Dockerfile - The Dockerfile for use in any standard docker deployment

  • .dockerignore - A docker ignore file with standard elixir defaults

For extended release configuration, the mix release.inittask can be used in addition to this task. See the Mix.Release docs for more details.

Link to this section Summary

Link to this section Functions