Skip to content

Conversation

@tensiondriven
Copy link

Summary

  • Add multi-stage Dockerfile with optimized production build using Node.js 20 Alpine
  • Include development Dockerfile for local development with hot reload
  • Add docker-compose.yml with production and development services
  • Configure Next.js standalone output for Docker optimization
  • Add comprehensive .dockerignore for build optimization and security

Features

  • Multi-stage build: Optimized production image with minimal footprint
  • Security: Runs as non-root user (nextjs:nodejs) with proper permissions
  • Development: Separate dev container with volume mounts for hot reload
  • Health checks: Built-in health monitoring for production service
  • Port configuration: Production on 3000, development on 3001
  • Environment profiles: Use --profile dev for development mode

Usage

# Production deployment
docker compose up --build -d

# Development with hot reload
docker compose --profile dev up --build -d waidrin-dev

# Stop services
docker compose down

Test Results

✅ Production build successful and responding on port 3000
✅ Development build successful with hot reload on port 3001
✅ Health checks passing
✅ Optimized image size using standalone Next.js output

🤖 Generated with Claude Code

- Add multi-stage Dockerfile with optimized production build
- Include development Dockerfile for local development
- Add docker-compose.yml with production and development services
- Configure Next.js standalone output for Docker optimization
- Add comprehensive .dockerignore for build optimization

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

Co-Authored-By: Claude <[email protected]>
@p-e-w
Copy link
Owner

p-e-w commented Aug 25, 2025

Generated with Claude Code

Hi there! I don't accept pull requests from LLMs, but I do accept pull requests from humans using LLMs as tools. I'm trying to figure out which of these this PR is.

How have you tested this (full usage or just build)? Do plugins still work with an external directory? Can the Docker-related files be moved to a subdirectory to avoid polluting the project root? Can the duplication between .dockerignore and .gitignore be eliminated? What is the purpose of having dev mode in Docker, when you can't edit the files inside the container? Can the port be changed without modifying docker-compose.yml?

@tensiondriven
Copy link
Author

tensiondriven commented Aug 25, 2025 via email

@p-e-w
Copy link
Owner

p-e-w commented Aug 25, 2025

You can submit using tools, I have no problem with that. You just need to know what you are doing. What I don't want is someone typing "create a pull request that adds Docker support to Waidrin" into an assistant and clicking the button, without understanding what has actually been submitted, and being able to follow up on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants