Implementing CI/CD for Phoenix Apps Using Docker

Implementing CI/CD for Phoenix Apps Using Docker

Source: dev.to

Type: Post

Aziz Abdullaev discusses a method to streamline the process for deploying Elixir Phoenix applications by leveraging Docker. The focus is on creating a continuous integration and deployment (CI/CD) pipeline that ensures updates are pushed to a live server with zero downtime. The process includes setting up a virtual machine and database, configuring SSH keys with GitHub, installing Docker, and writing various scripts to automate deployment. Additionally, the article covers generating a release with a Dockerfile, configuring Caddy for reverse proxy and SSL, and setting up docker-compose. Abdullaev details scripts such as deployer.sh, conditional-deploy.sh, and server-deploy.sh that manage deployment processes and checks. The use of crontab to schedule the deployment script for checking and applying updates every minute is also explained.

© HashMerge 2024