stumason / laravel-coolify
Manage, deploy, and monitor your Laravel application on Coolify - like Horizon for your infrastructure.
Installs: 620
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 2
pkg:composer/stumason/laravel-coolify
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.5
- illuminate/console: ^11.0|^12.0
- illuminate/contracts: ^11.0|^12.0
- illuminate/http: ^11.0|^12.0
- illuminate/support: ^11.0|^12.0
Requires (Dev)
- laravel/pint: ^1.18
- mockery/mockery: ^1.6
- orchestra/testbench: ^9.0|^10.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/phpstan: ^2.1
- dev-main
- v2.8.0
- v2.7.0
- v2.6.0
- v2.5.1
- v2.5.0
- v2.4.3
- v2.4.2
- v2.4.1
- v2.4.0
- v2.3.1
- v2.3.0
- v2.2.2
- v2.2.1
- v2.2.0
- v2.1.1
- v2.1.0
- v2.0.0
- v1.0.1
- v1.0.0
- v0.9.10
- v0.9.9
- v0.9.8
- v0.9.7
- v0.9.6
- v0.9.5
- v0.9.4
- v0.9.3
- v0.9.2
- v0.9.1
- v0.9.0
- dev-feat/base-images-and-entrypoint-improvements
- dev-feat/docker-entrypoint-migrations
- dev-fix/scheduler-permission-denied
- dev-feature/dashboard-v2
- dev-feature/database-config
- dev-feature/starlight-docs
- dev-feature/auto-deployment-workflow
- dev-feature/dockerfile-generation
- dev-feature/improve-provisioning-experience
- dev-feature/installation-guide-and-fixes
- dev-feature/production-ready-provisioning
- dev-fix/exclude-dependabot-from-claude
- dev-refactor
This package is auto-updated.
Last update: 2026-01-16 00:19:04 UTC
README
Deploy Laravel to Coolify with one command. Dashboard, CLI, and Dockerfile generation included.
Like Laravel Horizon for queues, but for your entire infrastructure.
Why This Exists
Self-hosting with Coolify is great, but managing deployments from the Coolify UI gets tedious. This package gives you:
- A beautiful dashboard inside your Laravel app - deploy, restart, view logs, manage env vars
- Artisan commands for everything - CI/CD pipelines, local development, scripting
- Production-ready Dockerfiles generated automatically - no Docker knowledge required
- Full API access to Coolify - build custom tooling, automations, whatever you need
Quick Start
composer require stumason/laravel-coolify php artisan coolify:install
Add to .env:
COOLIFY_URL=https://your-coolify.com COOLIFY_TOKEN=your-api-token
Then provision your infrastructure:
php artisan coolify:provision
Creates app + PostgreSQL + Dragonfly on Coolify and deploys. One command.
Documentation
Dashboard Features
Access at /coolify (configurable) - works like Horizon's dashboard.
| Feature | Description |
|---|---|
| Live Status | Real-time application health with animated indicators |
| One-Click Deploy | Deploy latest, force rebuild, or deploy specific commits |
| Deployment History | View all deployments with inline expandable build logs |
| Database Management | Start/stop/restart PostgreSQL, MySQL, Redis, Dragonfly |
| Environment Variables | Secure CRUD for env vars with masked values |
| Build Logs | Stream deployment logs in real-time |
| GitHub Integration | Links to commits, branches, repository |
| Coolify Deep Links | Jump directly to resources in Coolify UI |
Dashboard Screenshots
The dashboard shows everything at a glance:
- Application status with health checks
- Current branch, commit, and last deploy time
- Database and cache status with connection strings
- Recent deployments with inline build logs
- Quick actions for deploy, restart, stop
Artisan Commands
| Command | Description |
|---|---|
coolify:install |
Publish config, generate Dockerfile |
coolify:provision |
Create infrastructure on Coolify |
coolify:deploy |
Trigger deployment |
coolify:status |
Show application status |
coolify:logs |
View application logs |
coolify:restart |
Restart application |
coolify:rollback |
Rollback to previous deployment |
CI/CD Integration
# .github/workflows/deploy.yml - name: Deploy to Coolify run: php artisan coolify:deploy --force env: COOLIFY_URL: ${{ secrets.COOLIFY_URL }} COOLIFY_TOKEN: ${{ secrets.COOLIFY_TOKEN }}
Dockerfile Generation
The install command generates production-optimized Docker configuration:
php artisan coolify:install
Creates:
Dockerfile- Multi-stage build with OPcache, proper permissionsdocker/nginx.conf- Optimized for Laraveldocker/supervisord.conf- Process management (Horizon, Reverb, Scheduler auto-detected)docker/php.ini- Production PHP settings
Auto-detects and configures:
- Laravel Horizon (queue workers)
- Laravel Reverb (WebSockets)
- Laravel Scheduler
Programmatic API
use Stumason\Coolify\Coolify; // Deploy Coolify::deploy(); Coolify::deploy('custom-uuid'); // Status $status = Coolify::status(); $logs = Coolify::logs(); // Repositories for full control Coolify::applications()->get($uuid); Coolify::applications()->deploy($uuid, force: true); Coolify::applications()->restart($uuid); Coolify::applications()->envs($uuid); Coolify::databases()->all(); Coolify::databases()->start($uuid); Coolify::deployments()->forApplication($uuid); Coolify::deployments()->cancel($uuid); Coolify::servers()->all(); Coolify::services()->all();
Configuration
// config/coolify.php return [ 'url' => env('COOLIFY_URL'), 'token' => env('COOLIFY_TOKEN'), 'path' => env('COOLIFY_PATH', 'coolify'), // Dashboard URL path 'docker' => [ 'php_version' => '8.3', 'node_version' => '20', 'extensions' => ['pdo_pgsql', 'redis', 'pcntl', 'bcmath'], ], ];
Authentication
By default, the dashboard is only accessible in local environment. For production:
// app/Providers/AppServiceProvider.php use Stumason\Coolify\Coolify; public function boot(): void { Coolify::auth(function ($request) { return $request->user()?->isAdmin(); }); }
Requirements
- PHP 8.2+
- Laravel 11 or 12
- Coolify 4.x instance with API access
Testing
composer test # Run tests composer test:coverage # With coverage composer lint # Static analysis
Contributing
Contributions welcome! Please read CONTRIBUTING.md first.
License
MIT - see LICENSE
