aboutsummaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..bf50ea0
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,27 @@
+FROM node:20-slim as base
+
+ENV NODE_ENV=production
+
+WORKDIR /src
+
+
+FROM base as build
+
+COPY package.json package-lock.json ./
+RUN npm install
+
+COPY . ./
+
+RUN npm run build
+RUN npm prune
+
+
+FROM base
+
+ENV PORT=3000
+
+COPY --from=build /src/.output /src/.output
+# Optional, only needed if you rely on unbundled dependencies
+# COPY --from=build /src/node_modules /src/node_modules
+
+CMD [ "node", ".output/server/index.mjs" ] \ No newline at end of file