DEV Community

Pablo Grant
Pablo Grant

Posted on

Deploying the Phoenix Api to DigitalOcean using mix release

This is a personalized report that explains how to deploy an api to a Digital Ocean ubuntu server with minimal technical explanation.

  1. Log into your server with your ssh credentials.

e.g: ssh root@<yoururl>.com

  1. pull your code from your preferred branch.

  2. run mix deps.get to update your dependencies. You can then either run mix ecto.reset or mix ecto.migrate to reset/update your database depending on what you want to do. (You may need to disable any active services using the database during this time.)

  3. run MIX_ENV=<env> mix release to update your release folder.

  4. restart your systemctl service.

  5. Check the endpoint to see if it works as intended by checking /

Top comments (0)