Looking to hire Laravel developers? Try LaraJobs

laravel-microservice-base maintained by finwax

Description
The Laravel Microservice base.
Last update
2025/08/03 20:59 (dev-master)
License
Links
Downloads
0

Comments
comments powered by Disqus

Laravel Microservice Base

About

This project is base of microservice implements on Laravel.

Usage

Install

Get scripts

git clone --no-checkout --depth 1 https://github.com/FINWAX/laravel-microservice-base.git temp && cd temp && git sparse-checkout init --cone && git sparse-checkout set scripts && git checkout master && cd .. && mv temp/scripts . && (rm -rf temp 2>/dev/null || Remove-Item -Path temp -Recurse -Force 2>$null)

Note: run scripts from the corresponding directory!

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 normal
  • http://127.0.0.1:8087/health/availability - service is available
  • http://127.0.0.1:8087/greeting/hello-protected - auth via Zitadel
  • http://127.0.0.1:8087/greeting/hello-unprotected?name=Nohj - GET params passed well

Links