Architecture
docker-compose.yml
Three services:Dockerfile
The app container uses PHP 8.4-FPM with:- PostgreSQL and MySQL PDO extensions
- Composer for dependency management
- Supervisord for process management (PHP-FPM + queue workers)
- Proper file permissions for
storage/andbootstrap/cache/
Deployment steps
1. Configure environment
2. Build and start
3. Run initial setup
This section is for a new installation. Existing company databases must follow the IAM upgrade procedure. Do not reseed demonstration data or rotateJWT_SECRET during an upgrade.
4. Verify
Nginx configuration
Thenginx.conf file configures:
- FastCGI proxy to PHP-FPM on the app container
- Static asset serving from
public/ - CORS headers for bundled assets
- Proper
try_filesfor Laravel routing
Data persistence
PostgreSQL data is persisted via Docker volumes:Database backups
Makefile commands
Production considerations
- Use a managed database instead of Docker PostgreSQL for production
- Add SSL termination (via a load balancer or Nginx with Let’s Encrypt)
- Configure log rotation for application and Nginx logs
- Set up monitoring for container health and resource usage
- Use Redis instead of database for cache and queue in production
- Run queue workers as separate containers for scalability