Skip to content

Instantly share code, notes, and snippets.

@vitor-mariano
Created January 20, 2018 16:57
Show Gist options
  • Save vitor-mariano/113dc3bf1df168d9da21c08553cfd822 to your computer and use it in GitHub Desktop.
Save vitor-mariano/113dc3bf1df168d9da21c08553cfd822 to your computer and use it in GitHub Desktop.
Phoenix Framework with Docker
version: '3'
services:
elixir:
build: .
volumes:
- .:/home/app
ports:
- 4000:4000
postgres:
image: postgres:10.1-alpine
volumes:
- ./docker/postgres/data:/var/lib/postgresql/data
ports:
- 5432:5432
env_file:
- ./docker/postgres/.env
FROM elixir:1.6-alpine
RUN mkdir -p /home/app
WORKDIR /home/app
RUN mix archive.install \
https://github.com/phoenixframework/archives/raw/master/phx_new.ez --force
COPY . ./
RUN mix local.hex --force
RUN mix deps.get --force
RUN mix local.rebar --force
CMD ["mix", "phx.server"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment