@latest_post
Deploy a Phoenix application to a VPS
Prerequisites
First, we need a Phoenix app.
The application we'll be deploying is the one from:
Building a JSON API in Elixir with Phoenix .
I'll show the steps needed to have this app available at:
http://lobotuerto.com:4000
We'll go with Ubuntu for the OS.
Also, we should have a domain already configured on that machine.
So, when trying something like this, it should respond as expected:
curl -H "Content-Type: application/json" -X POST \
-d '{"email":"asd@asd.com","password":"qwerty"}' \
http://lobotuerto.com:4000/api/users/sign_in \
-c cookies.txt -b cookies.txt -i
OK, SSH into your VPS then follow the steps below.