forked from shukiv/jabali-panel
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
122 lines (92 loc) · 2.2 KB
/
Makefile
File metadata and controls
122 lines (92 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Jabali Web Hosting Panel - Development Makefile
.PHONY: dev test lint fix fresh migrate seed install build clean agent-restart agent-logs
# Development
dev:
composer dev
serve:
php artisan serve
queue:
php artisan queue:listen --tries=1
logs:
php artisan pail --timeout=0
# Testing
test:
php artisan test
test-filter:
@read -p "Filter: " filter && php artisan test --filter=$$filter
test-coverage:
php artisan test --coverage
# Code Quality
lint:
./vendor/bin/pint --test
fix:
./vendor/bin/pint
analyze:
./vendor/bin/phpstan analyse --memory-limit=512M 2>/dev/null || echo "PHPStan not installed"
# Database
migrate:
php artisan migrate
migrate-fresh:
php artisan migrate:fresh
seed:
php artisan db:seed
fresh: migrate-fresh seed
rollback:
php artisan migrate:rollback
# Build
build:
npm run build
build-dev:
npm run dev
install:
composer install
npm install
update:
composer update
npm update
# Cache
cache:
php artisan config:cache
php artisan route:cache
php artisan view:cache
clear:
php artisan config:clear
php artisan route:clear
php artisan view:clear
php artisan cache:clear
# Jabali Agent
agent-restart:
sudo systemctl restart jabali-agent
agent-status:
sudo systemctl status jabali-agent
agent-logs:
sudo tail -f /var/log/jabali/agent.log
agent-test:
@echo '{"action":"ping"}' | sudo socat - UNIX-CONNECT:/var/run/jabali/agent.sock
# Filament
filament-assets:
php artisan filament:assets
# Tinker
tinker:
php artisan tinker
# Cleanup
clean:
rm -rf node_modules
rm -rf vendor
rm -rf bootstrap/cache/*.php
rm -rf storage/framework/cache/data/*
rm -rf storage/framework/sessions/*
rm -rf storage/framework/views/*
# Help
help:
@echo "Available targets:"
@echo " dev - Start development servers (serve, queue, pail, vite)"
@echo " test - Run PHPUnit tests"
@echo " lint - Check code style with Pint"
@echo " fix - Fix code style with Pint"
@echo " migrate - Run database migrations"
@echo " fresh - Fresh migrate and seed"
@echo " build - Build frontend assets"
@echo " cache - Cache config, routes, views"
@echo " clear - Clear all caches"
@echo " agent-* - Jabali agent management"