Skip to content

Instantly share code, notes, and snippets.

@juanpabloaj
Created September 27, 2018 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanpabloaj/8e721cfa530bd5ec2ed218be106bc50e to your computer and use it in GitHub Desktop.
Save juanpabloaj/8e721cfa530bd5ec2ed218be106bc50e to your computer and use it in GitHub Desktop.
phoenix_docker_compose
version: '3'
services:
dev:
build:
context: .
dockerfile: Dockerfile
volumes:
- .:/code
ports:
- 4000:4000
db:
image: postgres
restart: always
environment:
POSTGRES_PASSWORD: postgres
volumes:
phoenix_code:
FROM elixir
RUN mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez
# install the Phoenix Mix archive
RUN mix archive.install --force https://github.com/phoenixframework/archives/raw/master/phx_new.ez
RUN mix local.hex --force \
&& mix local.rebar --force
# install Node.js (>= 8.0.0) and NPM in order to satisfy brunch.io dependencies # See https://hexdocs.pm/phoenix/installation.html#node-js-5-0-0
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && apt-get install -y inotify-tools nodejs
WORKDIR /code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment