From 21fd80de8446259984ab86c31cb07891a294609d Mon Sep 17 00:00:00 2001 From: Jonathan Sabbe Date: Wed, 8 May 2019 22:13:43 +0200 Subject: [PATCH] Play the game by running the project on a docker container --- DockerFile | 5 +++++ README.md | 10 ++++++++++ docker-compose.yml | 9 +++++++++ 3 files changed, 24 insertions(+) create mode 100644 DockerFile create mode 100644 docker-compose.yml diff --git a/DockerFile b/DockerFile new file mode 100644 index 0000000..35c07fc --- /dev/null +++ b/DockerFile @@ -0,0 +1,5 @@ +FROM node:latest +WORKDIR /var/tmp +COPY . /var/tmp +RUN npm install && npm run extract +ENTRYPOINT ["npm", "start"] diff --git a/README.md b/README.md index 82900b3..9dc19da 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,16 @@ If you need to make changes to MTL/OBJ files and want to preserve them, run this npm run compress +## Docker + +If you don't have npm stuff installed but you want to play the game, you can run the project on a Docker container. + +Run in this directory: + + docker-compose up + +You can then play the game at http://localhost:3000, and the Browsersync UI will be at http://localhost:3001. + ## Leaderboard selection Bash supports multiple options for leaderboard storage. The default is in-browser `localStorage`. A networked leaderboard is also supported, through sending leaderboard entries to a Parse server. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7f88f3c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: '3' +services: + clh-bash: + build: + context: ./ + dockerfile: DockerFile + ports: + - "3000:3000" + - "3001:3001"