finwax/laravel-microservice-base

The Laravel Microservice base.

v1.2.3 2025-03-31 18:33 UTC

This package is auto-updated.

Last update: 2025-05-01 00:17:57 UTC


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 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