Skip to content

Instantly share code, notes, and snippets.

@SwamiRama
Last active June 16, 2016 20:18
Show Gist options
  • Save SwamiRama/22689df7e8d105944643ff5ebc4bda69 to your computer and use it in GitHub Desktop.
Save SwamiRama/22689df7e8d105944643ff5ebc4bda69 to your computer and use it in GitHub Desktop.
Phoenix in Docker
docker-compose run app mix phoenix.new .
docker-compose up
version: '2'
services:
db:
image: postgres:9.5
ports:
- "5432:5432"
app:
build: .
command: mix phoenix.server
volumes:
- .:/app
ports:
- "4000:4000"
links:
- db
FROM elixir:latest
RUN apt-get update -qq && \
apt-get install -y \
build-essential \
libpq-dev \
nodejs \
npm \
git \
postgresql-client
RUN mix local.hex --force
RUN mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez --force
RUN mkdir /app
WORKDIR /app
ADD . /app
EXPOSE 4000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment