This project provides a generic structure for setting up Microservices with Laravel. By default the project uses a Queuing-System to handle asynchronous jobs.
To install all components needed for a local development environment you can use the provided setup.sh
script.
. ./bin/setup.sh
You can verify a successful installation by running the test suite:
composer run test
Make sure to configure the following files according to your needs:
- composer.json
- docker-compose.yml
- readme.md
- .env.example
- .env
- php-fpm.conf (app and worker)
This template uses environment variables for all configuration values, they are defined in the .environment file and
passed along to php-fpm via the php-fpm.conf ENV[...]
.
In order to enable error logging to sentry, first go to sentry.io and create a new project.
Copy the DSN and add it as SENTRY_LARAVEL_DSN
to your .environment file.
If you don't want to use Sentry for error logging, leave the env variable empty.
You can start listening for Messages in the Queue by running:
php artisan queue:work
make sure you run the command from within the docker app container
composer run test
composer run lint
You can also use the combined script by using composer run confirm
.
Since this template was originally created with Lumen 5.3, there might be some deviations to the default Lumen project. Hopefully we'll be able to refactor and modernize the setup soon.
Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and feature requests.
- Joblocal GmbH - Initial work - Joblocal
See also the list of contributors who participated in this project.