aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-05-28 21:31:59 +0200
committerMateja Marić <mail@matejamaric.com>2021-05-28 22:32:48 +0200
commitc5300bf942c178711e6c973cab7432acc2a73c4d (patch)
treef28914841ef2da7db6b3de661ec19f76c358a16f /Dockerfile
parent5ed4787e33e258cc9afa7e9d2886a0b590d69715 (diff)
downloadnode-playground-c5300bf942c178711e6c973cab7432acc2a73c4d.tar.gz
node-playground-c5300bf942c178711e6c973cab7432acc2a73c4d.zip
Add `Dockerfile` and `.dockerignore`.
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile18
1 files changed, 18 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..d638b6f
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,18 @@
+FROM node:14
+
+ENV PORT=8080
+ENV NODE_ENV=production
+
+WORKDIR /usr/src/app
+
+COPY package*.json ./
+
+USER node
+
+RUN npm clean-install --only=production
+
+COPY . .
+
+EXPOSE ${PORT}
+
+CMD [ "node", "index.js" ]