Created
January 20, 2018 16:57
-
-
Save vitor-mariano/113dc3bf1df168d9da21c08553cfd822 to your computer and use it in GitHub Desktop.
Phoenix Framework with Docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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