- Add Dockerfile and docker-compose.yml for containerized deployment - Update server to listen on all network interfaces for Docker compatibility - Add .dockerignore to exclude unnecessary files from build context - Enhance dashboard controller with additional user data, trends, and suggestions - Update package.json scripts for proper Docker build workflow
22 lines
287 B
Docker
22 lines
287 B
Docker
FROM node:18-alpine
|
|
|
|
WORKDIR /app
|
|
|
|
# Install build dependencies for native modules (sqlite3)
|
|
RUN apk add --no-cache python3 make g++
|
|
|
|
COPY package*.json ./
|
|
|
|
RUN npm install
|
|
|
|
COPY . .
|
|
|
|
# Ensure data directory exists
|
|
RUN mkdir -p data
|
|
|
|
RUN npm run build
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["npm", "start"]
|