1+ # 📦 Build the Docker image
2+ build :
3+ @echo " 🔧 Building Docker containers..."
4+ @docker-compose build
5+
6+ # 🚀 Start the bot in the background
7+ up :
8+ @echo " 🚀 Starting the bot..."
9+ @docker-compose up -d
10+
11+ # ⛔ Stop the bot and remove containers
12+ down :
13+ @echo " 🛑 Stopping the bot..."
14+ @docker-compose down
15+
16+ # 📺 Live logs from the bot
17+ logs :
18+ @echo " 📟 Streaming logs..."
19+ @docker-compose logs -f
20+
21+ # 🐚 Interactive shell access to the bot container
22+ sh :
23+ @docker-compose exec bot sh
24+
25+ # 📥 Install PHP dependencies using Composer
26+ composer-install :
27+ @echo " 📥 Installing composer dependencies..."
28+ @docker-compose run --rm bot composer install
29+
30+ # 🔄 Regenerate the Composer autoloader
31+ composer-dump :
32+ @echo " 🔄 Dumping composer autoloader..."
33+ @docker-compose run --rm bot composer dump-autoload
34+
35+ # ♻️ Restart the bot without rebuilding
36+ restart :
37+ @echo " ♻️ Restarting the bot..."
38+ @docker-compose down
39+ @docker-compose up -d
40+
41+ # ✅ Run tests (if you use PHPUnit)
42+ test :
43+ @echo " ✅ Running tests..."
44+ @docker-compose run --rm bot vendor/bin/phpunit
45+
46+ # 🧹 Lint PHP code (if PHP-CS-Fixer or PHPCS is used)
47+ lint :
48+ @echo " 🔍 Linting PHP files..."
49+ @docker-compose run --rm bot vendor/bin/phpcs --standard=PSR12 src/
50+
51+ # 🧼 Fix code style
52+ fix :
53+ @echo " 🧼 Fixing code style..."
54+ @docker-compose run --rm bot vendor/bin/phpcbf --standard=PSR12 src/
55+
56+ # 🧽 Clean up temporary/cache/dev files
57+ clean :
58+ @echo " 🧽 Cleaning build and cache files..."
59+ rm -rf vendor \
60+ .phpunit.result.cache \
61+ /tmp/* \
62+ data/* /lang.txt \
63+ data/* /user_config.json \
64+ data/* /* .sqlite \
65+ tests/output \
66+ * .log
67+
68+ # 📁 Normalize line endings via .gitattributes
69+ gitattributes-check :
70+ @echo " 🔄 Checking for line-ending normalization via .gitattributes..."
71+ @git add --renormalize .
72+
73+ # 🖥 Show the status of Docker containers
74+ ps :
75+ @echo " 📊 Showing Docker container status..."
76+ @docker-compose ps
0 commit comments