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": {