Awesome Open Source
Awesome Open Source


Why you should use it

  • Have you ever faced problems setting up an Elixir-Phoenix-Postgres development environment?

  • Do you think installing Postgres in your development system is a tricky business?

  • Worried about overloading your system with tons of dependencies and apps, making it slower, less productive?

  • Needing a specific version for Elixir, Phoenix and/or Postgres to run your tests and development smoothly?

  • Studying an outdated course (ie. Udemy's The Complete Elixir and Phoenix Bootcamp) and your exercises are no longer working?

You're not alone! This repo uses containers to set your mind free from dependency problems for this stack.

How it works

Setup instructions

  1. Make sure you have make, git, docker, and docker-compose installed in your system. If you don't, please follow the instructions provided bellow:

    Installing make

    |Debian/Ubuntu users|
    sudo apt install make
    |Mac users|
    $ brew install make
    |Windows users|

    Installing git

    |All users|

    Installing docker

    |All users|

    Installing docker-compose

    |All users|

  2. Clone this repository using git clone to your development directory and set it as the current directory:

    /your/path$ git clone
    /your/path$ cd elixirdock
  3. Edit the provided .env file to customize your versions. The default is set to work with Udemy's The Complete Elixir and Phoenix Bootcamp as shown bellow:

    # ---------------------------------------------------------
    # Erlang version (base container)
    # ---------------------------------------------------------
    # Check all valid tags at:
    # examples: 19, 20, 21, 22, 23, slim, latest, ...
    # ---------------------------------------------------------
    # Container ports (host:container)
    # ---------------------------------------------------------
    # Elixir version
    # ---------------------------------------------------------
    # Check all valid releases at:
    # examples: 1.6.6, 1.8, 1.11.2, ...
    # ---------------------------------------------------------
    # ---------------------------------------------------------
    # Phoenix version
    # ---------------------------------------------------------
    # Check all valid releases at:
    # examples: 1.2.5, 1.5.6, ...
    # ---------------------------------------------------------
    # ---------------------------------------------------------
    # Postgres version
    # ---------------------------------------------------------
    # Check all valid tags at:
    # examples: 9, 9.5, 10, 11, 12, 13, latest, ...
    # ---------------------------------------------------------
    #Container ports (host:container)
    # Default user and his password

    Note: Check out the Reference section to get help choosing versions that work better together.

  4. Build your containers using make to gain productivity.

    /your/path/elixirdock$ make setup
  5. You are all set! Now you can access the terminal of elixir_server container and run your apps:

    /your/path/elixirdock$ make open
    Makefile: Opening container interactive pseudo tty...
    [email protected]:/var/www# iex
    Erlang/OTP 22 [erts-] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [hipe]
    Interactive Elixir (1.8.2) - press Ctrl+C to exit (type h() ENTER for help)
  6. There are other tools in Makefile to help you manage the containers:

    /your/path/elixirdock$ make shutdown
    Makefile: Stopping and removing containers...
    Stopping postgres_server ... done
    Stopping elixir_server   ... done
    Removing postgres_server ... done
    Removing elixir_server   ... done

    You can see all tools in Makefile by typing just make:

    /your/path/elixirdock$ make
    open                           Open elixir container interactive pseudo tty
    setup-recreate                 Delete, recreate and start elixir and postgres containers
    setup                          Set up, for the first time use, elixir and postgres containers
    shutdown                       Shut down elixir and postgres containers
    start                          Start elixir and postgres containers (considering setup was done)
  7. Many people in Elixir community use Visual Studio Code as their primary editor. If you decide to choose this tool, it's recommended that you also install these very useful extensions:

  • Remote - Container extension to be able to connect to the elixir_server container directly and avoid permission problems.

A good guide on how to configure these extensions to code Elixir using remote containers can be found here.

Reference: choosing versions


  1. Versions that work with Elixir and Phoenix:

    You can choose almost any Postgres version you like. Just as a reminder, Phoenix uses postgrex Elixir lib to work. So please feel free to choose among one of these versions for your Elixir apps:

    8.4, 9.0-9.6 or later hstore is not supported on 8.4


  1. Under the hood, elixirdoc creates a container called postgres_server. This container is based on postgres docker image, thus the POSTGRES_VERSION in .env file should be a valid tag of this docker image.

Erlang and Elixir versions

  1. Erlang and Elixir compatible versions:

    1.0 17 - 17 (and Erlang/OTP 18 from v1.0.5)
    1.1 17 - 18
    1.2 18 - 18 (and Erlang/OTP 19 from v1.2.6)
    1.3 18 - 19
    1.4 18 - 19 (and Erlang/OTP 20 from v1.4.5)
    1.5 18 - 20
    1.6 19 - 20 (and Erlang/OTP 21 from v1.6.6)
    1.7 19 - 22
    1.8 20 - 22
    1.9 20 - 22
    1.10 21 - 22 (and Erlang/OTP 23 from v1.10.3)
    1.11 21 - 23


  2. Under the hood, elixirdoc creates a container called elixir_server. This container is based on erlang docker image, thus the ERLANG_VERSION in .env file should be a valid tag of this docker image.


Choose a valid release version listed as a tag on the github page of Phoenix:

If you run into problems, consider choosing an appropriate version of Elixir/Erlang for each specific version of Phoenix.

Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Docker (97,274
Dockerfile (26,588
Postgres (23,360
Version (20,790
Elixir (16,645
Docker Image (12,051
Erlang (9,062
Phoenix (4,860
Elixir Phoenix (400