Skip to content

Instantly share code, notes, and snippets.

@gjrevans
Last active August 15, 2017 20:45
Show Gist options
  • Save gjrevans/4e57a4087562af06d8f2668922995480 to your computer and use it in GitHub Desktop.
Save gjrevans/4e57a4087562af06d8f2668922995480 to your computer and use it in GitHub Desktop.
Run Phoenix in Production
# Initial setup
$ mix deps.get --only prod
$ MIX_ENV=prod mix compile
# Compile assets
$ brunch build --production
$ MIX_ENV=prod mix phoenix.digest
# Custom tasks (like DB migrations)
$ MIX_ENV=prod mix ecto.migrate
# Finally run the server
$ PORT=4001 MIX_ENV=prod mix phoenix.server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment