To get started with the PHP environment, follow these steps:
Copy the .env.example
file to .env
:
cp .env.example .env
Bring up the PHP service using Docker Compose:
docker compose up -d
After the service is up, you should be able to access PHP configuration
information at localhost:<<PORT>>
. This information is located in src/public/index.php
.
To prevent Git from tracking changes to a specific subfolder, such as src/public, you can utilize the git update-index command with the --assume-unchanged option. This command tells Git to treat the specified files or directories as if they are unchanged, effectively ignoring any modifications made within them.
Execute the following command to instruct Git to ignore changes within the src/public directory:
git update-index --assume-unchanged src/public/index.php
To install Laravel within this environment:
Run the following commands:
# composer requires a clean folder
rm -rf src/public
# use bash script to access container
sh fire composer create-project --prefer-dist laravel/laravel .
sh fire composer require filament/filament
php artisan migrate
php artisan filament:install --panels
php artisan filament:user
sh fire bun install