Posts tagged "tutorials"

← All posts

Named arguments with default values in Elixir, using Keyword.merge with a defaults keyword list

May 11, 2016

3 min read

Since Ruby 2.0 you can easily have methods that have named parameters with default values. Today I wanted to find the best way to do this in elixir. Below is what I came up with.

HTTPS for a Dokku app in under 5 minutes: install the dokku-letsencrypt plugin, set your email, then run dokku letsencrypt

February 18, 2016

1 min read

Do you have a Phoenix application deployed using Dokku? Then you have can switch to using HTTPS in less than 5 minutes.

Unique Ecto associations with a compound index: a unique index on reviews user_id and product_id, checked with unique_constraint in the changeset

November 12, 2015

2 min read

In this short blog post I want to show you how easy it is to use Ecto validations together with PostgreSQL unique indexes to validate the uniqueness of an association.

Deploy Phoenix with git push, using Dokku 0.4: dokku postgres:create, postgres:link, config:set, git push dokku master and mix ecto.migrate

September 25, 2015

4 min read

This is a complete guide on how to deploy a phoenix application to a VPS using Dokku 0.4.0. Dokku is built on docker and allows you to deploy apps using a heroku like workflow.