added Dockerfile (closes #27)
This commit is contained in:
parent
ea79ba1dfa
commit
edd9d5c15a
2 changed files with 7 additions and 6 deletions
3
Dockerfile
Normal file
3
Dockerfile
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
FROM alpine:3.11.5
|
||||||
|
RUN apk add --no-cache nodejs npm git imagemagick make && git clone https://gitdab.com/Codinget/Snek /snek && cd /snek && npm i && make && apk del git make imagemagick && printf '#!/bin/sh\ncd /snek\nnpm start\n' > start.sh && chmod +x start.sh
|
||||||
|
CMD /snek/start.sh
|
10
README.md
10
README.md
|
@ -16,9 +16,7 @@ A "simple" Snake, done as my final JS class project
|
||||||
- Node.js 10 and 12 are known to work
|
- Node.js 10 and 12 are known to work
|
||||||
|
|
||||||
## Running the game
|
## Running the game
|
||||||
- Clone this repository
|
- Get the Dockerfile
|
||||||
- Install the npm dependencies (`npm install`)
|
- `docker build` it
|
||||||
- Generate the assets, stylesheets and scripts (`make`)
|
- `docker run -p80:3000 <whatever you called the container>`
|
||||||
- Start the webserver (`npm start`)
|
- ideally, put it behind a reverse proxy
|
||||||
- The server listens on port 3000 on all available addresses
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue