Skip to content

Open-source and local-first Slack and Notion alternative that puts you in control of your data

Added dockerfile

ylber-gashi5c224665c0ea
diff --git a/server/Dockerfile b/server/Dockerfile
new file mode 100644
index 00000000..a15f0f35
--- /dev/null
+++ b/server/Dockerfile
@@ -0,0 +1,34 @@
+# Build stage
+FROM node:20-alpine as builder
+
+WORKDIR /app
+
+COPY package*.json ./
+COPY tsconfig.json ./
+
+# Install dependencies
+RUN npm ci
+
+COPY src/ ./src/
+
+RUN npm run build
+
+# Production stage
+FROM node:20-alpine
+
+WORKDIR /app
+
+# Copy package files
+COPY package*.json ./
+
+# Install only production dependencies
+RUN npm ci --only=production
+
+# Copy built JavaScript files from builder stage
+COPY --from=builder /app/dist ./dist
+
+ENV NODE_ENV=production
+
+EXPOSE 3000
+
+CMD ["node", "dist/index.js"]
\ No newline at end of file