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/ and bootstrap/cache/

Deployment steps

1. Configure environment

Set production values:

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 rotate JWT_SECRET during an upgrade.

4. Verify

Nginx configuration

The nginx.conf file configures:
  • FastCGI proxy to PHP-FPM on the app container
  • Static asset serving from public/
  • CORS headers for bundled assets
  • Proper try_files for Laravel routing

Data persistence

PostgreSQL data is persisted via Docker volumes:

Database backups

Makefile commands

Production considerations

  1. Use a managed database instead of Docker PostgreSQL for production
  2. Add SSL termination (via a load balancer or Nginx with Let’s Encrypt)
  3. Configure log rotation for application and Nginx logs
  4. Set up monitoring for container health and resource usage
  5. Use Redis instead of database for cache and queue in production
  6. Run queue workers as separate containers for scalability