diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..3c3629e64 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +node_modules diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..22ba7e318 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM node + +# Create app directory +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app + +# Setup the environment +ENV PATH /usr/src/app/bin:$PATH +EXPOSE 5000 + +# Install app dependencies +COPY package.json /usr/src/app/ +RUN npm install + +# Bundle app source +COPY . /usr/src/app + +# Compile static assets +# RUN npm run build + +# Prune development dependancies +RUN npm prune --production + +CMD [ "npm", "start" ] diff --git a/package.json b/package.json index 35b285171..06d39ec78 100644 --- a/package.json +++ b/package.json @@ -2,9 +2,9 @@ "name": "talk", "version": "0.0.1", "description": "A commenting platform from The Coral Project. https://coralproject.net", - "main": "server/app.js", + "main": "./server/bin/www", "scripts": { - "test": "npm test" + "start": "./server/bin/www" }, "repository": { "type": "git", @@ -17,7 +17,7 @@ "ask" ], "author": "", - "license": "ISC", + "license": "Apache-2.0", "bugs": { "url": "https://github.com/coralproject/talk/issues" },