# Backend Development Dockerfile # Hot reload enabled with nodemon FROM node:20-alpine # Install required packages RUN apk add --no-cache \ sqlite \ tini WORKDIR /app # Copy package files COPY package*.json ./ # Install all dependencies (including dev) RUN npm install # Copy application code COPY . . # Create necessary directories RUN mkdir -p database logs # Expose port EXPOSE 3000 # Use tini as entrypoint ENTRYPOINT ["/sbin/tini", "--"] # Start with nodemon for hot reload CMD ["npm", "run", "dev"]