- PHP 8.1
- Laravel 9
- Docker
- Docker-compose
- Beanstalkd - message queue
- REST API
- CORS
- Redis
- PhpUnit
- MySQL 5.7
The following sections describe dockerized environment.
Just keep versions of installed software to be consistent with the team and production environment (see Pre-requisites section).
Set your .env vars:
cp .env.example .env
Emails processing .env settings (you can use mailtrap or your smtp credentials like [email protected]):
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_USERNAME=<mailtrap_key>
MAIL_PASSWORD=<mailtrap_password>
MAIL_PORT=587
MAIL_FROM_ADDRESS=[email protected]
MAIL_FROM_NAME="BSA Thread Admin"
Start application docker containers:
docker-compose up -d
Install composer dependencies and generate app key:
docker exec -it hrtools-app composer install
docker exec -it hrtools-app php artisan key:generate
docker exec -it hrtools-app php artisan jwt:secret
Database migrations install (set proper .env vars)
docker exec -it hrtools-app php artisan migrate
docker exec -it hrtools-app php artisan db:seed
Application server should be ready on http://localhost:<APP_PORT>
If you need laravel queue, you must run this command:
docker-compose exec app php artisan queue:work beanstalkd
For ease of development, you can run the data generation function for the Laravel IDE Helper.
php artisan ide-helper:generate
php artisan ide-helper:models -N
php artisan ide-helper:meta
To debug the application we highly recommend you to use xDebug, it is already pre-installed in dockerized environment, but you should setup your IDE.
You can debug your app with Telescope tool which is installed already