-
-
Save israelb/1d1ff9e44423512393ac6772c0d4178c to your computer and use it in GitHub Desktop.
run phoenix on ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb | |
sudo apt-get update | |
sudo apt-get install git esl-erlang elixir postgresql nodejs nodejs-legacy npm | |
sudo npm -g install brunch@1 | |
mix local.hex | |
mix archive.install https://github.com/phoenixframework/phoenix/releases/download/v1.1.1/phoenix_new-1.1.1.ez | |
git clone https://github.com/eikes/phoenix_guides_server.git | |
cd phoenix_guides_server | |
mix deps.get | |
sudo npm install | |
brunch build --production | |
# Create the database | |
# Create config/prod.secret.exs | |
MIX_ENV=prod mix ecto.create | |
MIX_ENV=prod mix ecto.migrate | |
MIX_ENV=prod mix phoenix.digest | |
# Run | |
MIX_ENV=prod PORT=4001 elixir --detached -S mix do compile, phoenix.server | |
# Listen on port 80 as well | |
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 4001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment