Open-source and local-first Slack and Notion alternative that puts you in control of your data
TypeScript chatchat-applicationcrdteditorelectronknowledge-baselocal-firstnotionnotion-alternativerealtime-collaborationself-hostedslacksqliteteam-collaborationwikiyjs
Refactor Dockerfile for improved build and production stages
Image Updaterf860e74fbecc
diff --git a/server/Dockerfile b/server/Dockerfileindex a15f0f35..5a274c01 100644--- a/server/Dockerfile+++ b/server/Dockerfile@@ -1,21 +1,27 @@# Build stageFROM node:20-alpine as builder-WORKDIR /app+# Copy package filesCOPY package*.json ./COPY tsconfig.json ./# Install dependenciesRUN npm ci+# Copy source filesCOPY src/ ./src/-RUN npm run build+# Build and verify output+RUN npm run build && \+ ls -la dist/ && \+ if [ ! -f dist/index.js ]; then \+ echo "dist/index.js not found after build!" && \+ exit 1; \+ fi# Production stageFROM node:20-alpine-WORKDIR /app# Copy package files@@ -27,8 +33,14 @@ RUN npm ci --only=production# Copy built JavaScript files from builder stageCOPY --from=builder /app/dist ./dist-ENV NODE_ENV=production+# Verify files were copied correctly+RUN ls -la dist/ && \+ if [ ! -f dist/index.js ]; then \+ echo "dist/index.js not found in production stage!" && \+ exit 1; \+ fi+ENV NODE_ENV=productionEXPOSE 3000CMD ["node", "dist/index.js"]\ No newline at end of file