From 77d24c35e89b46140a61dac2adc35519275c6cce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Abadesso?= Date: Mon, 26 Apr 2021 11:41:58 -0300 Subject: [PATCH 1/2] chore: added dockerfile --- .dockerignore | 1 + Dockerfile | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..849ddff3 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +dist/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..518153ed --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +# Copyright 2020 Hathor Labs +# This software is provided ‘as-is’, without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# This software cannot be redistributed unless explicitly agreed in writing with the authors. + +FROM node:14 AS builder + +COPY package.json /app/ +RUN cd /app && npm install --global --unsafe-perm tsdx@0.14.1 +RUN npm install --production + +COPY . /app/ + +RUN cd /app && npm run build + +FROM node:14-alpine3.13 AS builder + +COPY --from=builder /app/dist/ /app/ +COPY --from=builder /app/node_modules /app/node_modules + +CMD node /app/index.js From 3d41afb131b566a8d67598c735df8e18dfc8a77a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Abadesso?= Date: Tue, 27 Apr 2021 16:15:57 -0300 Subject: [PATCH 2/2] chore: removed global tsdx from dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 518153ed..c2fb66e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,8 +7,8 @@ FROM node:14 AS builder COPY package.json /app/ -RUN cd /app && npm install --global --unsafe-perm tsdx@0.14.1 -RUN npm install --production + +RUN cd /app && npm install --production COPY . /app/