DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 966,904 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
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)

Update Your DEV Experience Level:

Settings

Go to your customization settings to nudge your home feed to show content more relevant to your developer experience level. πŸ›