fix: Resolve nodemon not found error in development Docker

- Explicitly set NODE_ENV=development during npm install to include devDependencies
- Add NODE_ENV=development environment variable in Dockerfile
- Add fallback dev:node script using Node.js --watch flag
- Ensure nodemon is installed with other development dependencies

This fixes the "sh: nodemon: not found" error in the development container.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-07-23 14:36:18 +02:00
parent 7bcee648ad
commit 677118bdc8
2 changed files with 7 additions and 2 deletions
+6 -2
View File
@@ -18,8 +18,9 @@ RUN addgroup -g 1000 -S nodejs && \
# Copy package files
COPY package*.json ./
# Install dependencies as root
RUN npm install
# Install all dependencies (including devDependencies for development)
# Make sure NODE_ENV is not set to production during install
RUN NODE_ENV=development npm install
# Create necessary directories
RUN mkdir -p logs temp && \
@@ -34,6 +35,9 @@ RUN chown -R nodejs:nodejs /app
# Switch to non-root user
USER nodejs
# Set development environment
ENV NODE_ENV=development
# Expose port
EXPOSE 7510