From d9e20edaea978c3646e8722e222b98fc60f3f2e7 Mon Sep 17 00:00:00 2001 From: Chi Kim Date: Thu, 15 Oct 2020 06:40:35 -0700 Subject: [PATCH] updates #1 - creates a dockerfile --- Dockerfile | 10 ++++++++++ package.json | 1 + 2 files changed, 11 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cd3fe94 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +# Build image +FROM node:12.18-alpine AS build + +# Install only the production dependencies +RUN npm i + +USER node + +EXPOSE 3000 +CMD ["npm", "start"] diff --git a/package.json b/package.json index 9ff1cf4..38ec79a 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "setup": "./scripts/setup.sh", + "start": "node app.js", "server": "webpack --config webpack.config.js && nodemon app.js", "dev": "webpack --config webpack.config.js --watch" },