Skip to content
Deployment

Docker and VPS

Deploy the app, queue, scheduler, Redis, database, and Nginx services.

Container stack

The production Compose stack runs the Laravel app, Nginx, queue services, MySQL, and Redis from the same repository. Persistent volumes hold database, Redis, and application storage data.

cp .env.example .env
# Configure production APP_URL, database, Redis, mail, and Stripe values.
docker compose up -d --build
docker compose exec app php artisan migrate --force
docker compose exec app php artisan storage:link
docker compose exec app php artisan config:cache

VPS process model

On a non-container VPS, Nginx serves public/, PHP-FPM handles requests, Supervisor keeps queue workers or Horizon alive, Redis backs cache/queues, and cron invokes the scheduler every minute.

* * * * * cd /var/www/baplay && php artisan schedule:run >> /dev/null 2>&1

Release checklist

  • • Back up database and storage before migration.
  • • Build assets with the lockfile and install Composer without dev dependencies.
  • • Cache configuration, routes, and views after environment values are final.
  • • Restart workers so queued code matches the release.