Skip to content

Test app, to clarify deploy with Docker Compose, Distillery, Phoenix & dynamic ENV variables

Notifications You must be signed in to change notification settings

cnsa/elixir-docker-compose

Repository files navigation

SomeApp

To start your Phoenix app:

  • Install dependencies with mix deps.get
  • Start Phoenix endpoint with mix phx.server

CrossOS Compilation

First:

  1. For this case we are compiling our images locally inside Docker

Then:

  • Build custom Docker image (+).
  • Just send resulting tarball into the Production server.

Current demo application running locally.

Docker for Mac:

Build, Release & Run with Docker:

$ make deploy
$ ARGS="web=5" make scale

Add demo host into /etc/hosts:

$ sudo sh -c "echo '127.0.0.1 some_app.lvh.me' >> /etc/hosts"    

Now you can visit some_app.lvh.me from your browser.

Docker Machine:

Build, Release & Run with Docker:

$ docker-machine start default
$ eval $(docker-machine env default)
$ make deploy
$ ARGS="web=5" make scale

Add demo host into /etc/hosts:

$ sudo sh -c "echo '$([[ $DOCKER_HOST =~ ^[a-z:\/]*([0-9\.]*):* ]] && echo ${BASH_REMATCH[1]}) some_app.lvh.me' >> /etc/hosts"

Cleanup:

$ make down

Ready to run in production? Please check our deployment guides.

Learn more

About

Test app, to clarify deploy with Docker Compose, Distillery, Phoenix & dynamic ENV variables

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published