Skip to content

Plangora/phoenix_deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploy Phoenix App on Ubuntu 18.04

Can deploy this app on Digital Ocean $5 droplet. Apply for $100 credit with Digital Ocean using this link

Server Setup

Setup nginx

Install nginx on ubuntu with:

sudo apt-get install nginx

Edit/Create config for proxy pass at /etc/nginx/sites-enabled/default

Setup Erlang with Elixir

wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get install esl-erlang elixir -y

Setup NodeJS for Asset Compile

sudo apt-get install nodejs npm

Copy Prod Secrets to Server

scp config/prod.secret.exs user@server.com:/secret/file/location/.

App Setup

Add Distillery and edeliver to Mix deps

defp deps do
  [
    {:edeliver, ">= 1.6.0"},
    {:distillery, "~> 2.0", warn_missing: false}
  ]
end

Update dependencies and generate distillery config

mix do deps.get, release.init

Setup Edeliver

Create file at .deliver/config

Deploy and turn on app!

mix edeliver update production --start-deploy

About

Demo app for deploying Phoenix App to Servers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published