From 0bf0fbfe58be54c5026d1373c4e050c9b19c1aa0 Mon Sep 17 00:00:00 2001 From: Curtis Mattoon Date: Fri, 23 Mar 2018 10:16:54 -0400 Subject: [PATCH] Adds Dockerfile, changes config.js to use type:file --- .dockerignore | 2 ++ Dockerfile | 21 +++++++++++++++++++++ config.js | 9 +++------ 3 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..93f1361 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules +npm-debug.log diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b6f4508 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM node:carbon + +LABEL org.label-schema.schema-version = "1.0.0" +LABEL org.label-schema.name = "hastebin" +LABEL org.label-schema.description = "Open-Source PasteBin Written in Node.js" +LABEL org.label-schema.vcs-url = "https://github.com/cmattoon/haste-server" + +WORKDIR /usr/src/app + +# Capture dependencies in their own layer +COPY package*.json ./ +RUN npm install + +COPY . . + +EXPOSE 80 + +VOLUME ["/data"] + +CMD ["npm", "start"] + diff --git a/config.js b/config.js index 52ad004..df8efa9 100644 --- a/config.js +++ b/config.js @@ -1,7 +1,7 @@ { "host": "0.0.0.0", - "port": 7777, + "port": 80, "keyLength": 10, @@ -33,11 +33,8 @@ }, "storage": { - "type": "redis", - "host": "0.0.0.0", - "port": 6379, - "db": 2, - "expire": 2592000 + "type": "file", + "path": "/data" }, "documents": {