Add Docker Support for Easy Installation and Deployment #4559
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add Docker Support for Easy Installation and Deployment
Summary
This pull request adds comprehensive Docker support to Cachet v3, making installation and deployment significantly easier for users. The Docker setup includes a complete production-ready environment with Nginx, PHP-FPM, MySQL, and Redis.
What's Included
Core Docker Files
Dockerfile
- Production-ready multi-stage build with PHP 8.3, Nginx, and all required extensionsdocker-compose.yml
- Complete orchestration with app, database, and Redis services.env.docker.example
- Template environment file for Docker deploymentDOCKER.md
- Comprehensive documentation and setup instructionsDocker Configuration
docker/nginx/nginx.conf
- Optimized Nginx configuration for Laravel/Filamentdocker/php/cachet.ini
- PHP optimizations for productiondocker/supervisor/supervisord.conf
- Process management for Nginx, PHP-FPM, and queue workersdocker/entrypoint.sh
- Startup script with database migrations and cachingWhy Docker Support?
Features
Security Best Practices
Production Optimizations
Easy Setup
Architecture
The Docker setup uses a 3-service architecture:
All services communicate via a private Docker network with health checks ensuring proper startup order.
Benefits for Users
Testing
The Docker setup has been thoroughly tested and includes:
Documentation
Complete setup instructions are provided in
DOCKER.md
covering:Future Enhancements
This Docker foundation enables:
Conclusion
This Docker implementation makes Cachet more accessible to users by eliminating complex setup procedures. It provides a production-ready foundation that can grow from simple single-server deployments to complex orchestrated environments.
We believe this addition will significantly improve the user experience and adoption of Cachet v3.
Files Changed:
Dockerfile
docker-compose.yml
.env.docker.example
DOCKER.md
docker/nginx/nginx.conf
docker/php/cachet.ini
docker/supervisor/supervisord.conf
docker/entrypoint.sh