Skip to content

Commit 5cad5e9

Browse files
committed
docs: add missing commands and Kick integration
- Add coolify:setup-ci command documentation - Add coolify:destroy command documentation - Add Laravel Kick integration documentation - Update dashboard API docs with Kick endpoints - Update dashboard overview to mention Kick tab - Update reference docs with Kick config options - Update sidebar navigation
1 parent 959dece commit 5cad5e9

8 files changed

Lines changed: 338 additions & 0 deletions

File tree

docs/astro.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,16 @@ export default defineConfig({
5858
{ label: 'coolify:logs', slug: 'commands/logs' },
5959
{ label: 'coolify:restart', slug: 'commands/restart' },
6060
{ label: 'coolify:rollback', slug: 'commands/rollback' },
61+
{ label: 'coolify:setup-ci', slug: 'commands/setup-ci' },
62+
{ label: 'coolify:destroy', slug: 'commands/destroy' },
6163
],
6264
},
6365
{
6466
label: 'Dashboard',
6567
items: [
6668
{ label: 'Overview', slug: 'dashboard/overview' },
6769
{ label: 'Authentication', slug: 'dashboard/authentication' },
70+
{ label: 'Kick Integration', slug: 'dashboard/kick' },
6871
{ label: 'API', slug: 'dashboard/api' },
6972
],
7073
},
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: coolify:destroy
3+
description: Destroy provisioned infrastructure on Coolify
4+
---
5+
6+
## Usage
7+
8+
```bash
9+
php artisan coolify:destroy
10+
```
11+
12+
## Options
13+
14+
```bash
15+
--force # Skip confirmation prompts
16+
```
17+
18+
## What It Does
19+
20+
Removes all resources created by `coolify:provision`:
21+
22+
- Application container
23+
- PostgreSQL database
24+
- Dragonfly cache
25+
- Project (if empty)
26+
27+
## Warning
28+
29+
This is a destructive operation. All data in databases will be permanently deleted.
30+
31+
## Examples
32+
33+
Interactive destruction (with confirmations):
34+
35+
```bash
36+
php artisan coolify:destroy
37+
```
38+
39+
Force destruction without prompts:
40+
41+
```bash
42+
php artisan coolify:destroy --force
43+
```
44+
45+
## Cleanup
46+
47+
After destruction, you may want to remove the `.env` entries:
48+
49+
```bash
50+
COOLIFY_PROJECT_UUID=
51+
```
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
title: coolify:setup-ci
3+
description: Generate GitHub Actions workflow for CI/CD deployments
4+
---
5+
6+
## Usage
7+
8+
```bash
9+
php artisan coolify:setup-ci
10+
```
11+
12+
## Options
13+
14+
```bash
15+
--branch= # Branch to deploy on push (default: main)
16+
--no-manual # Disable manual workflow_dispatch trigger
17+
--force # Overwrite existing workflow file
18+
```
19+
20+
## What It Does
21+
22+
Generates `.github/workflows/coolify-deploy.yml` with:
23+
24+
- Automatic deployment on push to specified branch
25+
- Manual trigger via GitHub Actions UI
26+
- Proper secrets configuration
27+
28+
## Examples
29+
30+
Basic setup:
31+
32+
```bash
33+
php artisan coolify:setup-ci
34+
```
35+
36+
Deploy on push to `production` branch:
37+
38+
```bash
39+
php artisan coolify:setup-ci --branch=production
40+
```
41+
42+
Overwrite existing workflow:
43+
44+
```bash
45+
php artisan coolify:setup-ci --force
46+
```
47+
48+
## Generated Workflow
49+
50+
```yaml
51+
name: Deploy to Coolify
52+
53+
on:
54+
push:
55+
branches: [main]
56+
workflow_dispatch:
57+
58+
jobs:
59+
deploy:
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: shivammathur/setup-php@v2
64+
with:
65+
php-version: '8.4'
66+
- run: composer install --no-dev --optimize-autoloader
67+
- run: php artisan coolify:deploy --force --wait
68+
env:
69+
COOLIFY_URL: ${{ secrets.COOLIFY_URL }}
70+
COOLIFY_TOKEN: ${{ secrets.COOLIFY_TOKEN }}
71+
COOLIFY_PROJECT_UUID: ${{ secrets.COOLIFY_PROJECT_UUID }}
72+
```
73+
74+
## Required Secrets
75+
76+
Add these to your GitHub repository settings:
77+
78+
| Secret | Description |
79+
|--------|-------------|
80+
| `COOLIFY_URL` | Your Coolify instance URL |
81+
| `COOLIFY_TOKEN` | API token from Coolify |
82+
| `COOLIFY_PROJECT_UUID` | Project UUID (from `coolify:provision`) |

docs/src/content/docs/dashboard/api.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,27 @@ GET /api/projects/{uuid}/environments # List environments
7676
```
7777
GET /api/stats # Aggregated dashboard data
7878
```
79+
80+
## Kick Integration
81+
82+
These endpoints proxy requests to Laravel Kick on your deployed applications.
83+
84+
```
85+
GET /api/kick/{appUuid}/status # Check if Kick is configured
86+
GET /api/kick/{appUuid}/health # Health check results
87+
GET /api/kick/{appUuid}/stats # System stats (CPU, memory, disk)
88+
GET /api/kick/{appUuid}/logs # List log files
89+
GET /api/kick/{appUuid}/logs/{file} # Read log entries
90+
GET /api/kick/{appUuid}/queue # Queue status
91+
GET /api/kick/{appUuid}/queue/failed # Failed jobs list
92+
GET /api/kick/{appUuid}/artisan # List available commands
93+
POST /api/kick/{appUuid}/artisan # Execute artisan command
94+
```
95+
96+
### Query Parameters
97+
98+
Log reading supports:
99+
100+
- `level` - Filter by log level (DEBUG, INFO, WARNING, ERROR, etc.)
101+
- `search` - Full-text search
102+
- `lines` - Number of lines to return (default: 100)
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
---
2+
title: Laravel Kick Integration
3+
description: Enhanced application introspection with Laravel Kick
4+
---
5+
6+
The dashboard integrates with [Laravel Kick](https://github.com/StuMason/laravel-kick) to provide deep introspection into your running applications.
7+
8+
## What is Laravel Kick?
9+
10+
Laravel Kick is a package you install on your **deployed application** that exposes secure endpoints for:
11+
12+
- Health checks (database, cache, storage, redis)
13+
- System stats (CPU, memory, disk, uptime)
14+
- Log file viewing with filtering
15+
- Queue status and failed jobs
16+
- Artisan command execution
17+
18+
## Setup
19+
20+
### 1. Install Kick on Your Deployed App
21+
22+
```bash
23+
composer require stumason/laravel-kick
24+
```
25+
26+
### 2. Configure Environment Variables
27+
28+
Add to your application's Coolify environment variables:
29+
30+
```bash
31+
KICK_ENABLED=true
32+
KICK_TOKEN=your-secure-random-token
33+
```
34+
35+
Generate a secure token:
36+
37+
```bash
38+
openssl rand -base64 32
39+
```
40+
41+
### 3. Deploy
42+
43+
After deployment, a **Kick** tab appears in the dashboard for that application.
44+
45+
## Dashboard Features
46+
47+
### Overview Tab
48+
49+
- **Health Checks** - Real-time status of database, cache, storage, and redis connections
50+
- **System Stats** - CPU load, memory usage, disk space, and uptime
51+
- **Queue Status** - Quick view of pending jobs and failed count
52+
53+
### Logs Tab
54+
55+
- **File Selection** - Browse all Laravel log files
56+
- **Level Filtering** - Filter by DEBUG, INFO, WARNING, ERROR, etc.
57+
- **Search** - Full-text search across log entries
58+
- **Line Limits** - Control how many lines to display
59+
60+
### Queue Tab
61+
62+
- **Connection Info** - Current queue driver and status
63+
- **Queue Sizes** - Pending jobs per queue (default, high, low)
64+
- **Failed Jobs** - List of failed jobs with exception details
65+
66+
### Artisan Tab
67+
68+
- **Command List** - All whitelisted artisan commands
69+
- **Execution** - Run commands directly from the dashboard
70+
- **Output** - View command output and exit codes
71+
72+
## Security
73+
74+
### Token Authentication
75+
76+
All Kick endpoints require the `KICK_TOKEN` for authentication. The token is:
77+
78+
- Sent as a Bearer token in the Authorization header
79+
- Never exposed in the dashboard UI
80+
- Required for every request
81+
82+
### Command Whitelisting
83+
84+
Artisan commands must be explicitly whitelisted in your Kick configuration. By default, only safe read-only commands are allowed.
85+
86+
### Rate Limiting
87+
88+
The artisan execution endpoint is rate-limited to 10 requests per minute to prevent abuse.
89+
90+
## Configuration
91+
92+
In your **Laravel Coolify** config (`config/coolify.php`):
93+
94+
```php
95+
'kick' => [
96+
// Enable/disable kick integration globally
97+
'enabled' => env('COOLIFY_KICK_ENABLED', true),
98+
99+
// Cache TTL for kick config lookups (seconds)
100+
'cache_ttl' => env('COOLIFY_KICK_CACHE_TTL', 60),
101+
102+
// Timeout for kick API requests (seconds)
103+
'timeout' => env('COOLIFY_KICK_TIMEOUT', 10),
104+
],
105+
```
106+
107+
In your **deployed app's** Coolify environment:
108+
109+
```bash
110+
KICK_ENABLED=true
111+
KICK_TOKEN=your-secure-token
112+
KICK_PREFIX=kick # Optional, defaults to 'kick'
113+
```
114+
115+
## Troubleshooting
116+
117+
### "Kick Service Unavailable" Error
118+
119+
This usually means:
120+
121+
1. **Route cache needs rebuilding** - Run `php artisan route:cache` on the server
122+
2. **Application is restarting** - Wait for deployment to complete
123+
3. **Kick package not installed** - Verify with `composer show stumason/laravel-kick`
124+
125+
### Tab Not Appearing
126+
127+
The Kick tab only appears when:
128+
129+
1. `KICK_ENABLED=true` is set in the app's environment
130+
2. `KICK_TOKEN` is configured
131+
3. The Kick endpoints are reachable
132+
133+
### Authentication Errors
134+
135+
Verify your `KICK_TOKEN` matches between:
136+
137+
- The app's Coolify environment variables
138+
- What Laravel Kick expects on the deployed app

docs/src/content/docs/dashboard/overview.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,19 @@ The dashboard includes multiple pages accessible from the sidebar:
8888
| **Resources** | All databases and services in your environment |
8989
| **Configuration** | Environment variables, settings, backup schedules |
9090
| **Logs** | Real-time application logs |
91+
| **Kick** | Laravel Kick introspection (when configured) |
92+
93+
### Kick Tab
94+
95+
When your deployed application has [Laravel Kick](https://github.com/StuMason/laravel-kick) installed and configured, a **Kick** tab appears with:
96+
97+
- Health checks (database, cache, storage, redis)
98+
- System stats (CPU, memory, disk, uptime)
99+
- Log viewer with filtering and search
100+
- Queue status and failed jobs
101+
- Artisan command execution
102+
103+
See [Kick Integration](/dashboard/kick) for setup details.
91104

92105
## Quick Actions
93106

docs/src/content/docs/reference/config.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,13 @@ return [
6767
'max_execution_time' => env('COOLIFY_PHP_MAX_EXECUTION_TIME', 60),
6868
],
6969
],
70+
71+
// Laravel Kick integration
72+
'kick' => [
73+
'enabled' => env('COOLIFY_KICK_ENABLED', true),
74+
'cache_ttl' => env('COOLIFY_KICK_CACHE_TTL', 60),
75+
'timeout' => env('COOLIFY_KICK_TIMEOUT', 10),
76+
],
7077
];
7178
```
7279

docs/src/content/docs/reference/env-vars.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,26 @@ When `COOLIFY_USE_BASE_IMAGE=false`:
5757
- Build time: ~12 minutes
5858
- Use this if you need custom PHP extensions
5959

60+
## Kick Integration
61+
62+
These control how Laravel Coolify connects to Laravel Kick on your deployed apps.
63+
64+
| Variable | Default | Description |
65+
|----------|---------|-------------|
66+
| `COOLIFY_KICK_ENABLED` | `true` | Enable Kick integration |
67+
| `COOLIFY_KICK_CACHE_TTL` | `60` | Cache Kick config lookups (seconds) |
68+
| `COOLIFY_KICK_TIMEOUT` | `10` | Kick API timeout (seconds) |
69+
70+
### On Your Deployed App
71+
72+
These are set in your **application's Coolify environment** (not your local `.env`):
73+
74+
| Variable | Description |
75+
|----------|-------------|
76+
| `KICK_ENABLED` | Set to `true` to enable Kick endpoints |
77+
| `KICK_TOKEN` | Authentication token for Kick API |
78+
| `KICK_PREFIX` | Optional, defaults to `kick` |
79+
6080
## How Application Lookup Works
6181

6282
Only `COOLIFY_PROJECT_UUID` is stored in your `.env`. All other resource UUIDs (applications, databases, etc.) are fetched from the Coolify API.

0 commit comments

Comments
 (0)