Last active
June 16, 2016 20:18
-
-
Save SwamiRama/22689df7e8d105944643ff5ebc4bda69 to your computer and use it in GitHub Desktop.
Phoenix in 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
docker-compose run app mix phoenix.new . | |
docker-compose up |
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: '2' | |
services: | |
db: | |
image: postgres:9.5 | |
ports: | |
- "5432:5432" | |
app: | |
build: . | |
command: mix phoenix.server | |
volumes: | |
- .:/app | |
ports: | |
- "4000:4000" | |
links: | |
- db |
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: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