Skip to content

kenmazaika/elixir-phoenix-notes-and-playground

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To start your new Phoenix application:

  1. Install dependencies with mix deps.get
  2. Start Phoenix endpoint with mix phoenix.server

Now you can visit localhost:4000 from your browser.

Deploying to heroku

Core Tutorial

Other Tutorial I used

Digital Ocean.

Key notes:

  • Elixir version was 1.1.0-dev, not 1.0.2, needed to checkout tag on github and then install elixir to keep versioning consistent
  • I needed to run the release command on the ubuntu server
MIX_ENV=prod /root/PhoenixTutorials/rel/phoenix_crud/bin/phoenix_crud start
MIX_ENV=prod mix release
mix release.clean

useradd deploy passwd deploy sudo adduser deploy sudo mkdir /home/deploy chown deploy:deploy /home/deploy chmod 0700 /home/deploy

cat ~/.ssh/id_rsa.pub | ssh [email protected] "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"



sudo apt-get update && apt-get upgrade sudo apt-get install build-essential libncurses5-dev openssl libssl-dev fop xsltproc unixodbc-dev #> curl -O http://www.erlang.org/download/otp_src_17.3.tar.gz #> tar xzfv otp_src_17.3.tar.gz #> cd otp_src_17.3 #> ./configure && make && sudo make install


ln -s  erts-6.2/bin/run_erl bin/run_erl


#> sudo apt-get install git #> cd #> git clone https://github.com/elixir-lang/elixir.git #> cd elixir #> make clean test export PATH="$PATH:/root/elixir/bin"



CREATE USER ken WITH PASSWORD 'yoloswaglol';
CREATE DATABASE phoenix_crud2;
GRANT ALL PRIVILEGES ON DATABASE phoenix_crud2 to ken;


MIX CLEAN!



Stop server, run migration start back up


MIX_ENV=prod mix ecto.migrate Repo


touch /etc/nginx/sites-available/phoenix_crud
ln -s /etc/nginx/sites-available/phoenix_crud /etc/nginx/sites-enabled
vim /etc/nginx/site-available/phoenix_crud

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published