Skip to content

This project provides a generic structure for setting up Microservices with Lumen. By default the project uses a Queuing-System to handle asynchronous jobs.

Notifications You must be signed in to change notification settings

joblocal/microservice-template

Repository files navigation

Microservice Template

This project provides a generic structure for setting up Microservices with Laravel. By default the project uses a Queuing-System to handle asynchronous jobs.

Requirements

Setup

To install all components needed for a local development environment you can use the provided setup.sh script.

. ./bin/setup.sh

Verify Installation

You can verify a successful installation by running the test suite:

composer run test

Configuration

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)

Environment Variables

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[...].

Sentry Error Logging

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.

Messaging Queue

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

Testing & Linting

composer run test
composer run lint

You can also use the combined script by using composer run confirm.

Technologies used

Note

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.

Contributing

Please read through our contributing guidelines. Included are directions for opening issues, coding standards, and feature requests.

Authors

  • Joblocal GmbH - Initial work - Joblocal

See also the list of contributors who participated in this project.

About

This project provides a generic structure for setting up Microservices with Lumen. By default the project uses a Queuing-System to handle asynchronous jobs.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published