Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile #198

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM node:0.12.7
MAINTAINER Danilo Bargen <[email protected]>

# Choose work directory
WORKDIR /app/

# Install node packages
ADD package.json /app/
RUN npm install

# Install bower packages
ADD bower.json /app/
RUN npm install -g bower gulp
RUN bower --allow-root --force-latest install

# Run gulp tasks
ADD . /app
RUN gulp

# Add config.json
ADD config.json.docker /app/config.json

# Entry point
EXPOSE 8080
CMD ["node", "bin/curvytron.js"]
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ A web multiplayer Tron game like with curves
## Installation

* [Get your local Curvytron server in 1 minute!](doc/installation.md)
* [...or launch a Docker container with the game!](doc/docker.md)

---

Expand Down
11 changes: 11 additions & 0 deletions config.json.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"port": 8080,
"googleAnalyticsId": null,
"inspector": {
"enabled": false,
"host": "localhost",
"username": "curvytron",
"password": "curvytron",
"database": "curvytron"
}
}
23 changes: 23 additions & 0 deletions doc/docker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Prerequisite

You need to install Docker.

## Building an Image

__Clone the repository__

git clone https://github.com/Elao/curvytron.git
cd curvytron

__Build the docker image__

docker build -t yourname/curvytron .

## Launch server

docker run -d --name curvytron -p 8080:8080 yourname/curvytron

## Play

Go to [http://localhost:8080](http://localhost:8080/)
Join a room, choose a player name and play!
2 changes: 2 additions & 0 deletions doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
Curvytron runs on [node.js >= v0.10](https://nodejs.org/).
You need to install node on the machine that will run the Curvytron server.

Alternatively, you could also [run Curvytron on Docker](doc/docker.md).

## Installation

__Clone the repository__
Expand Down