Files
BarangaySystem/.agents/rules/artisan-commands.md
2026-06-06 18:43:00 +08:00

655 B

trigger
trigger
always_on

Rule: Running PHP Artisan Commands

Important

Never execute php artisan commands directly on the host machine.

Correct Approach

All Artisan commands must be executed inside the Docker container.

📦 Reason

The application environment (PHP version, extensions, dependencies) is fully configured inside the container. Running commands outside may cause:

  • Version mismatches
  • Missing dependencies
  • Inconsistent behavior

🛠️ How to Execute

Use one of the following patterns depending on the setup:

Docker Compose

docker compose exec <app_service> php artisan <command>