Skip to content

Instantly share code, notes, and snippets.

@zemuldo
Created June 20, 2019 07:35
Show Gist options
  • Save zemuldo/ea1783682b579408a17f0db8633fcfed to your computer and use it in GitHub Desktop.
Save zemuldo/ea1783682b579408a17f0db8633fcfed to your computer and use it in GitHub Desktop.
# Ensure to execute chmod 777 path/to/this/file
# Configure your env variables here
export PG_USER=username
export PG_PASSWORD=password
export PG_HOST=prod_db_host
export DATABASE=prod_db
# Create database, Run migrations Compile app and Start Server
MIX_ENV=prod mix compile.protocols
MIX_ENV=prod mix ecto.create
MIX_ENV=prod mix ecto.migrate
MIX_ENV=prod PORT=4001 elixir -pa _build/prod/consolidated -S mix phx.server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment