finwax / laravel-microservice-base
The Laravel Microservice base.
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:project
Requires
- php: ^8.2
- laravel/framework: ^12.0
- laravel/tinker: ^2.10.1
- mggflow/lv-msvc: ^3.1
Requires (Dev)
- fakerphp/faker: ^1.23
- laravel/pail: ^1.2.2
- laravel/pint: ^1.13
- laravel/sail: ^1.41
- mockery/mockery: ^1.6
- nunomaduro/collision: ^8.6
- phpunit/phpunit: ^11.5.3
README
About
This project is base of microservice implements on Laravel.
Usage
Install
Download and prepare project
sh /path-to/scripts/install.sh -u1000 -g1000 -r"FINWAX/laravel-microservice-base" -d"/destination-path" -p"/previous-path-if-needs-import-data"
Then do first launch
sh /path_to/scripts/first-launch.sh "/path-to/project"
Fill and validate env files for dev/test and production.
Then use
sh /path_to/scripts/dev-launch.sh "/path-to/project"
or
sh /path_to/scripts/prod-launch.sh "/path-to/project"
Update
Use update script
sh /path_to/scripts/update.sh -u1000 -g1000 -r"FINWAX/laravel-microservice-base" -d"/current-path" -p"/path-to-move-current-version"
Control
If it needs - use docker compose exec lv ...command
.
Run dev server
composer run dev
Provide existing migrations
php artisan migrate
Optimize composer + cache config, events, routes, views
sh /path_to/scripts/optimize.sh "/path-to/project"
Clear caches
sh /path_to/scripts/clear.sh "/path-to/project"
View
Check example endpoints:
http://127.0.0.1:8087/health/check
- service works normalhttp://127.0.0.1:8087/health/availability
- service is availablehttp://127.0.0.1:8087/greeting/hello-protected
- auth via Zitadelhttp://127.0.0.1:8087/greeting/hello-unprotected?name=Nohj
- GET params passed well