Cogini Blog
Articles by deployment

A new approach to deploying Elixir apps: mix_deploy
A new approach to deploying Elixir apps: mix_deploy Read more…

Deploying Elixir apps with Ansible
Deploying Elixir apps with Ansible, an easy-to-use standard tool for managing servers. Read more…

Servers for beginners
Spinning up a server is easy enough, just go to Digital Ocean and push a button. But now you are responsible for your server. What does that mean? Read more…

The impact of network latency, errors, and concurrency on benchmarks
The goal of benchmarking is to understand the performance of our system and how to improve it. When we are making benchmarks, we need to make sure that they match real world usage. In my post on Benchmarking Phoenix on Digital Ocean, changing the concurrent connections and network latency had … Read more…

Managing app secrets with Ansible
In web applications we usually have a few things that are sensitive, e.g. the login to the production database or API keys used to access a third party API. We need to be particularly careful about how we manage these secrets, as they may allow attackers to access data … Read more…

Benchmarking Phoenix on Digital Ocean
Just for fun, I decided to benchmark the performance of the elixir deploy template running on a $5/month Digital Ocean Droplet. Read more…

Database migrations in the cloud
Database migrations are used to automatically keep the database in sync with the code that uses it. Elixir apps should be deployed as releases, supervised by systemd. Here is an example of how to run migrations when deploying Elixir releases. It's tempting to automatically run database migrations when the app … Read more…

Deploying Elixir apps without sudo
We normally deploy Elixir apps as releases, supervised by systemd. After we have deployed the new release, we restart the app to make it live: sudo /bin/systemctl restart foo The user account needs sufficient permissions to restart the app, though. Instead of giving the deploy account full sudo permissions … Read more…

Setting Ansible variables based on the environment
When deploying applications, we we usually have the same basic architecture in different environments (dev, test, prod), but settings differ. Some settings are common to all the machines in the environment, e.g. the db server connection string. We need to vary the size of instances depending on the environment … Read more…