aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorLeonardo Bishop <me@leonardobishop.com>2024-03-16 00:22:44 +0000
committerLeonardo Bishop <me@leonardobishop.com>2024-03-16 00:22:44 +0000
commit49d9a49cc16525c3d2fc04408cec2df0defd51ac (patch)
tree32a50ed6a0e75be0b59bb62ff6e91e76c5875f8e /Dockerfile
parent5f701c749f51ff37a43fab71edd38eda12169876 (diff)
Add dockerfile
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..123df45
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,24 @@
+FROM node:20 AS build
+
+WORKDIR /srv
+
+COPY package*.json ./
+
+RUN npm install
+
+COPY . .
+
+RUN npm run build
+
+
+FROM node:20 AS run
+
+WORKDIR /srv
+
+COPY package*.json ./
+
+RUN npm install --omit=dev
+
+COPY --from=build /srv/dist dist/
+
+CMD [ "node", "dist/main.js" ]