From d612331ce34502eecb2e4d55e0ea384aed6480c8 Mon Sep 17 00:00:00 2001 From: Stephen Dunne Date: Fri, 25 Mar 2022 12:19:17 +0000 Subject: [PATCH] Adding docker support --- docker-compose.yaml | 24 ++++++++++++++++++++++++ dockerfile | 9 +++++++++ 2 files changed, 33 insertions(+) create mode 100644 docker-compose.yaml create mode 100644 dockerfile diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 00000000..de47a71e --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,24 @@ +version: "2" +services: + redis: + image: redis:latest + container_name: "redis-dock" + user: "redis" + ports: + - "6379:6379" + expose: + - "6379" + networks: + - scrumblr-net + node: + image: "scrumblr:latest" + container_name: "scrumblr" + user: "node" + ports: + - "1000:1000" + networks: + - scrumblr-net +networks: + scrumblr-net: + driver: bridge + name: scrumblr-net \ No newline at end of file diff --git a/dockerfile b/dockerfile new file mode 100644 index 00000000..3296508a --- /dev/null +++ b/dockerfile @@ -0,0 +1,9 @@ +FROM node:13.11.0-slim +ENV NODE_ENV=production + +COPY . . + +RUN npm install + +EXPOSE 1000 +CMD node server.js --server:port=1000 --redis:url=redis://redis-dock:6379