Skip to content

Commit

Permalink
Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
noelbk committed Feb 15, 2017
1 parent dc94a30 commit 90b1c6b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions .dockerignore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ rel
TODOs.org
TODOs.org_archive
docs/
databases/
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM elixir
FROM elixir:1.4.1
WORKDIR /app
ADD . .
RUN apt-get update
Expand All @@ -7,8 +7,12 @@ RUN mix local.hex --force
RUN mix deps.get
RUN npm cache clean -f; npm install -g n; n stable
RUN npm install
RUN mkdir -p db
RUN mix battle_snake_server.createdb
RUN mix local.rebar --force
RUN mix compile
RUN mkdir -p databases
RUN mix test
RUN rm -rf databases/dev
RUN mix battle_snake.schema
EXPOSE 4000
ENV PORT 4000
CMD mix phoenix.server
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
## Quicker Start

* Install [Docker](https://docs.docker.com/engine/installation/)
* ```docker run -d -p 4000:4000 noelbk/battle_snake_server```
* `docker run -d -p 4000:4000 noelbk/battle_snake_server`
* Connect to http://localhost:4000


## Quick Start
* Install OTP 19 (skip if you have OTP)
* get [kerl](https://github.com/kerl/kerl)
Expand Down Expand Up @@ -37,3 +36,10 @@

## Testing
`mix test`

## Building the docker image locally

* `docker build --rm -t battle_snake_server .`
* `docker run -d -p 4000:4000 battle_snake_server`
* Connect to http://localhost:4000

0 comments on commit 90b1c6b

Please sign in to comment.