added Dockerfile (closes #27)

main
Codinget 5 years ago
parent 0d1087ef7b
commit 51dacea167
  1. 3
      Dockerfile
  2. 10
      README.md

@ -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

@ -16,9 +16,7 @@ A "simple" Snake, done as my final JS class project
- Node.js 10 and 12 are known to work
## Running the game
- Clone this repository
- Install the npm dependencies (`npm install`)
- Generate the assets, stylesheets and scripts (`make`)
- Start the webserver (`npm start`)
- The server listens on port 3000 on all available addresses
- Get the Dockerfile
- `docker build` it
- `docker run -p80:3000 <whatever you called the container>`
- ideally, put it behind a reverse proxy

Loading…
Cancel
Save