diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4d8dde9 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,9 @@ +node_modules +npm-debug.log +.git +.gitignore +README.md +.env +.DS_Store +*.md +.cleanup-report.md diff --git a/Dockerfile b/Dockerfile index c16f006..b52825c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,13 +2,23 @@ FROM node:18-alpine WORKDIR /app +# Copy package files COPY backend/package*.json ./ -RUN npm install --production && npm cache clean --force +# Install dependencies with verbose output for debugging +RUN echo "Installing dependencies..." && \ + npm install --production && \ + echo "Dependencies installed successfully" && \ + npm list --production && \ + npm cache clean --force +# Copy application code COPY backend/src ./src COPY frontend ./frontend +# Verify express was installed +RUN ls -la node_modules | grep express || echo "WARNING: express not found in node_modules" + EXPOSE 4001 CMD ["node", "src/server.js"]