Skip to content

Instantly share code, notes, and snippets.

@ecpplus
Created October 4, 2016 15:01
Show Gist options
  • Save ecpplus/519d226d103a976d1e8b51b20294cc65 to your computer and use it in GitHub Desktop.
Save ecpplus/519d226d103a976d1e8b51b20294cc65 to your computer and use it in GitHub Desktop.
#! /bin/sh
mix deps.get --only prod
MIX_ENV=prod mix compile
# Compile assets
npm i
chmod +x node_modules/webpack/bin/*
NODE_ENV=production node_modules/webpack/bin/webpack.js -p
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