/laravel-boilerplate-mariadb

Alternative of https://github.com/egorsmkv/laravel-boilerplate with MariaDB

Primary LanguagePHPApache License 2.0Apache-2.0

Laravel Boilerplate + MariaDB

Note

It must:

  • be on the latest version of Laravel
  • be lightweight to run with Docker
  • use modern technologies such as PHP 8.3, Go 1.21, Python 3.12, etc.

Requirements

  • Docker 25.x
  • Task 3.x
  • Bun 1.x

Usage

# Build dev image
task build

# Remove builds
task build-prune

# Up containers
task up

# Copy Laravel environment variables file
cp -n dev-frontend.env apps/frontend/.env

# Install dependencies, generate key, run migrations
task install

# Run queue worker
task queue

# Enter the apps container
task console

Useful commands

Fix permissions:

task fix-perms

Use Vite:

# Start dev server
task bun-dev

# Build for production
task bun-build

Update locales:

task lang-update

Apply fixes by phpcs:

task fix-phpcs

Analyse the code by Larastan:

task phpstan

Check security vulnerabilities in dependencies:

task check-security

Info

Database monitoring

  • Access http://localhost:8081 to enter the adminer;

Other

  • Access http://localhost/?SPX_KEY=dev&SPX_UI_URI=/ to enable PHP-SPX and see the profiling results.
  • task is a command of Taskfile utility.

Maintenance

  • Read UPDATE.md to keep the project up to date;
  • Use dive to analyze Docker images;
  • Use grype to check security vulnerabilities.