LaravelStarter

laravel-prod-starter — Laravel Starter Template

By asadtahta95

A Docker Compose-based Laravel deployment template integrating PHP 8.3-FPM, Nginx, MariaDB, Redis, a queue worker, a scheduler, and backup scripts. The README provides the complete directory structure and deployment commands.

Explore the design

Compare the page layouts and mobile experience. Open any screenshot for a closer look.

3 previews
Desktop homepage1 / 3
Desktop captureTop of page

Actual screenshot captured by the server browser.

All pages & views 3

Screenshots show visual appearance; interactive behavior may differ.

Recorded 2026-10-14View source

What stands out

A quick read of the recorded project description.

01

A single docker-compose.yml orchestrates nginx:1.27, php:8.3-fpm, mariadb:11.4, redis:7, and the queue worker and scheduler containers

02

Image versions are pinned; passwords are injected as required variables via .env's DB_PASS, DB_ROOT_PASS, REDIS_PASS, with no hardcoded credentials

03

MariaDB uses a volume with a health check, and startup order is controlled via depends_on's service_healthy

04

Provides scripts/deploy.sh (composer install, migrate, cache) and scripts/backup-db.sh (timestamped mariadb-dump)

05

The backup container runs on demand via the compose tools profile, with backup files output to the backups/ directory

06

The README lists specific changes relative to the older repository, including removing links/version, switching to relative ./src mounts, and adding opcache and a queue worker

Template Details

This is a production-oriented starter template for running a Laravel application in containers. The README explains that it is organized by a single docker-compose.yml: client requests first reach the nginx:1.27 container, then are forwarded to the php:8.3-fpm application container (with extensions and opcache); the application connects to mariadb:11.4 with a health-checked volume and redis:7 with AOF and a password enabled; the queue worker and scheduler run as separate containers reusing the same PHP image; backups are executed on demand via the compose tools profile.

The repository structure includes docker-compose.yml, .env.example, php/Dockerfile and opcache.ini, nginx/default.conf, a src/ directory for placing Laravel code, as well as scripts/deploy.sh (composer install, migrate, cache), scripts/backup-db.sh (timestamped mariadb-dump), and a Makefile. The installation flow provided in the README is to clone the repository and run make up, place the code into ./src, copy .env.example to .env and set DB_PASS, DB_ROOT_PASS, REDIS_PASS, then run make up and make deploy, and finally visit localhost:8080.

The README explicitly lists the changes relative to the older repository Docker_Compose_Laravel: pinned image versions, removal of hardcoded passwords in favor of required .env variables, changing absolute path mounts to relative ./src, removal of the deprecated links and version keys, adding a service_healthy dependency for MariaDB, and adding opcache, a queue worker, a scheduler, Redis with a password and AOF, health checks, a backup sidecar, and deploy.sh. The security notes require not committing .env and backups/*.gz, changing all change-me-* passwords before the first startup, and point out that in production MariaDB (3306 not published) or phpMyAdmin (removed by design) should not be exposed. The README does not provide the specific Laravel version, CI configuration details, TLS termination method, or the full reverse proxy configuration; these need to be confirmed independently.

LaravelStarter

Is it right for your project?

Use Cases

  • After placing an existing Laravel project into ./src, use make up and make deploy to start the full container stack locally or on a server
  • Deployment scenarios that require the queue worker and scheduler to run as separate containers alongside the web application
  • Generate timestamped database backups via make backup, and restore from compressed files using the mariadb command
  • Behind a reverse proxy such as Traefik or Nginx Proxy Manager, direct traffic to the template's exposed port 8080

Suitable For

  • Developers who want to deploy Laravel with Docker Compose and need queue, scheduler, Redis, and database backup components
  • Deployment environments that require pinned image versions and avoidance of hardcoded passwords
  • Teams that accept placing application code in the src/ directory and completing deployment and backups via the Makefile and scripts

Getting started & customization

Use these recorded setup notes alongside the repository instructions for your chosen version.

  1. 1

    After cloning the repository, run make up, and place the Laravel code into ./src (or clone the application in that directory)

  2. 2

    Copy .env.example to .env, set DB_PASS, DB_ROOT_PASS, REDIS_PASS, and change all change-me-* passwords before the first startup

  3. 3

    Run make up and make deploy in sequence, then visit http://localhost:8080

  4. 4

    Use make backup for backups; to restore, use gunzip -c backups/full-YYYY-MM-DD-HHMM.sql.gz | docker compose exec -T db mariadb -uroot -p"$DB_ROOT_PASS"

  5. 5

    Do not commit .env or backups/*.gz; the README states that MariaDB or phpMyAdmin should not be exposed in production

Read repository instructions

License & source material

Usage conditions & limitations

Free to use · keep license notice

This entry covers the free version under the MIT license in the public repository; the free scope is the code of that version and does not mean external services or third-party assets are free.

Must comply with when using

  • Free use, modification, commercial use, and distribution of this version's code are permitted.
  • When distributing copies or substantial portions of the code, retain the original author's copyright notice and the complete MIT license notice.
  • The code is provided as is; warranties and limitations of liability are governed by the original license and applicable law.

Additional costs & items to verify

  • Demo images, fonts, icons, and other third-party assets must be checked against their respective licenses; they cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments, or AI may incur separate charges.
  • Before deployment, you must copy .env.example to .env and manually set database and Redis passwords such as DB_PASS, DB_ROOT_PASS, and REDIS_PASS; otherwise it cannot start properly.
  • If you need to provide services externally over HTTPS, you must prepare and configure a reverse proxy such as Traefik or Nginx Proxy Manager yourself, directing traffic to the template's exposed port 8080.
  • All change-me-* default passwords must be changed before the first up; otherwise there is a security risk.
  • In production, MariaDB (port 3306 not published) or phpMyAdmin (removed by design) should not be exposed externally; you must ensure network isolation yourself.
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

vim .env # set DB_PASS, DB_ROOT_PASS, REDIS_PASS

Original README

Behind TLS: point your `reverse-proxy-lab` Traefik/NPM at `http://<host>:8080`.

Original README

- Change all `change-me-*` passwords before first `up`.

Original README

- Do not expose MariaDB (no published 3306) or phpMyAdmin in production — removed by design.

Original README
https://github.com/asadtahta95/laravel-prod-starter/blob/main/LICENSEhttps://github.com/asadtahta95/laravel-prod-starter/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-14. Results only cover the materials read; dependencies, images, fonts, and subsequent term changes are subject to their respective original texts.

Project checks & description sources

Template Information

Source platforms
GitHub
Documentation and maintenance reference score
More documented · 80 / 100
Technologies
Laravel
Website type
Starter
How this score is calculated

Our heuristic uses license records (up to 30), a demo link (12), a preview (10), stars (15), recorded maintenance (15), description completeness (8), feature records (5) and classification data (5). It is not a code, security or performance test, or a Google score. A link does not establish tested functionality.

What to verify for this project

Repository update recorded
2026-09-30
Screenshot last checked
2026-10-14

A demo link is listed. Check it with your own content and viewport sizes; its presence does not confirm that forms, authentication or payments work.

The catalog identifies Laravel as the primary stack. Check the actual dependency manifest and lockfile for versions and hosting requirements. These notes use recorded metadata, not a code audit or a deployment test.

Use a selection guide →

How this description was prepared

AI-assisted description based on catalog records and repository material. Repository authors are not automatically the reviewers of this description.

Review declaration: codex-user-requested-batch-review-20261015 · 2026-10-15

Inspect the recorded source material

SHA-256: e56da323271cd3c12eee1b632c8838fad5efe0d32b43db1fac97a704fd89f0a2

2026-10-14T05:02:47.059Z

Source file / repository
# Laravel Prod Starter

Production-ready **Laravel (PHP 8.3-FPM + Nginx + MariaDB 11 + Redis + queue + scheduler + backups)** in one Compose file. Upgrades the old `Docker_Compose_Laravel` (dev-only, hardcoded passwords, `latest` tags) into a deployable starter.

## Architecture

```
client -> web (nginx:1.27) -> app (php:8.3-fpm, extensions + opcache)
app -> db (mariadb:11.4, healthchecked volume) + redis:7 (AOF + password)
queue worker + scheduler run as separate containers from the same PHP image
backup runs on demand via compose profile "tools"
```

## Structure

```
laravel-prod-starter/
├── docker-compose.yml
├── .env.example
├── php/Dockerfile + opcache.ini
├── nginx/default.conf
├── src/                  # put your Laravel app here
├── scripts/deploy.sh     # composer install + migrate + caches
├── scripts/backup-db.sh  # timestamped mariadb-dump
└── Makefile
```

## Quick Installation (One Line setup)

```bash
git clone https://github.com/asadtahta95/laravel-prod-starter.git && cd laravel-prod-starter && make up
```

Then put your code in `./src` (or clone your app there), and deploy:

```bash
cp .env.example .env
vim .env   # set DB_PASS, DB_ROOT_PASS, REDIS_PASS
make up
make deploy
open http://localhost:8080
```

Backup and restore:

```bash
make backup
ls backups/
gunzip -c backups/full-YYYY-MM-DD-HHMM.sql.gz | docker compose exec -T db mariadb -uroot -p"$DB_ROOT_PASS"
```

Behind TLS: point your `reverse-proxy-lab` Traefik/NPM at `http://<host>:8080`.

## What changed from the old repo

1. **Pinned versions:** `mariadb:latest` + `phpmyadmin` + unpinned PHP -> `mariadb:11.4`, `php:8.3-fpm-alpine`, `nginx:1.27-alpine`, `redis:7-alpine`.
2. **No hardcoded secrets:** `testdock/passdock` in compose -> required `DB_PASS`/`DB_ROOT_PASS`/`REDIS_PASS` via `.env` (fail-fast `:?`).
3. **Portable volume:** absolute `/var/www/html` host mount -> relative `./src`.
4. **Removed `links` + `version`:** deprecated keys dropped; `depends_on` with `service_healthy` for MariaDB.
5. **Added prod pieces missing before:** opcache, queue worker, scheduler, Redis with password+AOF, healthcheck, backup sidecar, `deploy.sh`.
6. Added `Makefile`, `.env.example`, CI compose validation.

## Security notes

- Never commit `.env` or `backups/*.gz`.
- Change all `change-me-*` passwords before first `up`.
- Do not expose MariaDB (no published 3306) or phpMyAdmin in production — removed by design.

## License

MIT
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.