LaravelStarter

laravel-dockerized-starter — Laravel Starter Template

By tanjir-mahabub

A Dockerized Laravel starter template that integrates development services such as Nginx, MySQL, Redis, and MailHog, and provides Render deployment configuration and GitHub Actions workflows.

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-13View source

What stands out

A quick read of the recorded project description.

01

Docker Compose orchestrates services including PHP-FPM, Nginx, MySQL, Redis, and MailHog

02

Provides docker-compose.dev.yml and docker-compose.prod.yml to distinguish development and production configurations

03

Local development includes three auxiliary interfaces: phpMyAdmin, Redis Commander, and MailHog

04

Includes a Dockerfile and render.yaml for deployment on Render

05

Provides GitHub Actions workflows that can deploy automatically based on RENDER_SERVICE_ID and RENDER_API_KEY

06

The README lists common commands such as database migration, cache clearing, and running artisan and composer inside containers

Template Details

This is a Laravel starter template whose core purpose is to package the local development environment and deployment configuration together into Docker. The README states that it includes a complete Docker configuration for PHP 8.4, Nginx, MySQL 8.0, Redis, and MailHog, and provides local development helper tools such as phpMyAdmin and Redis Commander. The project structure distinguishes docker-compose.yml, docker-compose.dev.yml, and docker-compose.prod.yml; the Dockerfile is used for the production image, render.yaml is used for Render deployment, and GitHub Actions workflows are stored under .github.

The usage flow has clear steps in the README: after cloning the repository, run docker-compose up -d to start the services, enter the app container to run composer install, php artisan key:generate, and php artisan migrate, then access the application via localhost; phpMyAdmin, Redis Commander, and MailHog listen on ports 8080, 8081, and 8025 respectively. For deployment, the README gives the Render process of connecting the repository, setting environment variables such as the database and APP_KEY, and automatic deployment via the Dockerfile and render.yaml; it also mentions that GitHub Actions can be used with the two secrets RENDER_SERVICE_ID and RENDER_API_KEY to complete automated deployment.

The README does not describe the template's built-in specific business features, test coverage, runtime tuning beyond PHP extensions, or provide performance or production environment validation results; these aspects need to be evaluated by users themselves.

LaravelStarter

Is it right for your project?

Use Cases

  • Teams or individual projects that need to unify the Laravel local development environment into Docker
  • Scenarios where a Laravel application is to be deployed on Render in containers and integrated with GitHub Actions
  • Laravel projects that need to use MySQL, Redis, and email testing tools simultaneously during local development
  • Starter projects that need a reference Docker directory structure and Nginx and PHP configuration examples

Suitable For

  • Laravel developers familiar with the basic operations of Docker and Docker Compose
  • New projects that need a containerized development environment and deployment configuration template
  • Teams using Render as the deployment platform and hoping to integrate CI/CD
  • Developers who need to debug the database and Redis locally

Getting started & customization

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

  1. 1

    Prerequisites are Docker, Docker Compose, and Git.

  2. 2

    After cloning the repository, run docker-compose up -d or docker-compose -f docker-compose.dev.yml up -d to start the services.

  3. 3

    Enter the app container to run composer install, php artisan key:generate, and php artisan migrate.

  4. 4

    The local access address is http://localhost, phpMyAdmin is 8080, Redis Commander is 8081, and MailHog is 8025.

  5. 5

    For Render deployment, set DB_HOST, DB_DATABASE, DB_USERNAME, DB_PASSWORD, DB_PORT, and APP_KEY in the console; the GitHub Actions method requires configuring RENDER_SERVICE_ID and RENDER_API_KEY.

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 a public repository; the free scope is the code of that version and does not mean that external services or third-party assets are free.

Must comply with when using

  • Free use, modification, commercial use, and distribution of that 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 need to be checked against their respective licenses and cannot be judged solely by the code's MIT license.
  • External services such as domains, hosting, databases, payments, or AI may incur additional charges.
  • Deploying to Render requires connecting the GitHub repository to the Render platform, i.e., relying on the external service Render.
  • When deploying on Render, environment variables such as database connection and APP_KEY need to be set manually in the Render console.
  • Using GitHub Actions for automated deployment requires configuring repository secrets.
  • GitHub Actions automated deployment requires providing the Render service ID (RENDER_SERVICE_ID).
  • GitHub Actions automated deployment requires providing the Render API key (RENDER_API_KEY).
View Original Text Basis

Permission is hereby granted, free of charge

Original License Text

1. **Connect Repository**: Link your GitHub repository to Render

Original README

2. **Environment Variables**: Set the following in Render dashboard:

Original README

The template includes a GitHub Actions workflow for automated deployment. Set these secrets:

Original README

- `RENDER_SERVICE_ID`: Your Render service ID

Original README

- `RENDER_API_KEY`: Your Render API key

Original README
https://github.com/tanjir-mahabub/laravel-dockerized-starter/blob/main/LICENSEhttps://github.com/tanjir-mahabub/laravel-dockerized-starter/blob/main/README.md

Compiled by DeepSeek based on repository license and README ·2026-10-13. 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
Partly documented · 74 / 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
2025-06-29
Screenshot last checked
2026-10-13

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: 8675f9651dc179b4cce59498e7d34ca40fe2764576017883cccb399119f34ad1

2026-10-13T19:42:51.754Z

Source file / repository
# 🚀 Laravel Dockerized Starter Template

A production-ready Laravel starter template with Docker, Nginx, MySQL, Redis, and automated deployment to Render.

## ✨ Features

- **🐳 Dockerized Development**: Complete Docker setup with PHP 8.4, Nginx, MySQL 8.0, Redis, and MailHog
- **🚀 Production Ready**: Optimized for deployment on Render with single-container setup
- **🔧 Development Tools**: Includes phpMyAdmin, Redis Commander, and MailHog for local development
- **⚡ CI/CD Ready**: GitHub Actions workflow for automated deployment
- **🔒 Security**: Proper environment variable handling and security headers
- **📱 Modern Stack**: Laravel 11, PHP 8.4, MySQL 8.0, Redis 7

## 🚀 Quick Start

### Prerequisites

- Docker and Docker Compose
- Git

### 1. Create New Project

```bash
# Use this template to create a new repository
# Then clone your new repository
git clone <your-repo-url>
cd <your-project-name>
```

### 2. Start Development Environment

```bash
# Start all services
docker-compose up -d

# Or use the development configuration
docker-compose -f docker-compose.dev.yml up -d
```

### 3. Install Laravel Dependencies

```bash
# Enter the PHP container
docker-compose exec app bash

# Install dependencies
composer install

# Generate application key
php artisan key:generate

# Run migrations
php artisan migrate

# Exit container
exit
```

### 4. Access Your Application

- **Laravel App**: http://localhost
- **phpMyAdmin**: http://localhost:8080
- **Redis Commander**: http://localhost:8081
- **MailHog**: http://localhost:8025

## 🏗️ Project Structure

```
laravel-dockerized-starter/
├── docker/                    # Docker configurations
│   ├── mysql/                # MySQL configuration
│   ├── nginx/                # Nginx configuration
│   └── php/                  # PHP configuration
├── src/                      # Laravel application
├── docker-compose.yml        # Main Docker Compose
├── docker-compose.dev.yml    # Development configuration
├── docker-compose.prod.yml   # Production configuration
├── Dockerfile               # Production Dockerfile
├── render.yaml              # Render deployment config
└── .github/                 # GitHub Actions workflows
```

## 🐳 Docker Services

| Service             | Port      | Description         |
| ------------------- | --------- | ------------------- |
| **app**             | 9000      | PHP-FPM Application |
| **nginx**           | 80        | Web Server          |
| **mysql**           | 3306      | Database            |
| **redis**           | 6379      | Cache/Session Store |
| **mailhog**         | 1025/8025 | Email Testing       |
| **phpmyadmin**      | 8080      | Database Management |
| **redis-commander** | 8081      | Redis Management    |

## 🚀 Deployment

### Render Deployment

1. **Connect Repository**: Link your GitHub repository to Render
2. **Environment Variables**: Set the following in Render dashboard:

   ```
   DB_HOST=your-mysql-host
   DB_DATABASE=your-database-name
   DB_USERNAME=your-username
   DB_PASSWORD=your-password
   DB_PORT=3306
   APP_KEY=base64:your-generated-key
   ```

3. **Deploy**: Render will automatically deploy using the `Dockerfile` and `render.yaml`

### GitHub Actions (Alternative)

The template includes a GitHub Actions workflow for automated deployment. Set these secrets:

- `RENDER_SERVICE_ID`: Your Render service ID
- `RENDER_API_KEY`: Your Render API key

## 🔧 Configuration

### Environment Variables

Create `.env` files for different environments:

#### Local Development

```bash
# Copy example file
cp src/.env.example src/.env

# Update with local settings
DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=laravel_user
DB_PASSWORD=laravel_password
```

#### Production

Set these in your deployment platform (Render):

```bash
APP_ENV=production
APP_DEBUG=false
DB_HOST=your-production-host
DB_DATABASE=your-production-database
DB_USERNAME=your-production-username
DB_PASSWORD=your-production-password
```

### Database Setup

```bash
# Run migrations
docker-compose exec app php artisan migrate

# Seed database (if seeders exist)
docker-compose exec app php artisan db:seed

# Create a new migration
docker-compose exec app php artisan make:migration create_example_table
```

## 🛠️ Development Commands

```bash
# Start services
docker-compose up -d

# Stop services
docker-compose down

# View logs
docker-compose logs -f

# Execute commands in container
docker-compose exec app php artisan list
docker-compose exec app composer install
docker-compose exec app npm install

# Access database
docker-compose exec mysql mysql -u laravel_user -p laravel

# Clear caches
docker-compose exec app php artisan cache:clear
docker-compose exec app php artisan config:clear
docker-compose exec app php artisan route:clear
```

## 🔒 Security

- Environment variables are properly handled
- Sensitive files are protected by Nginx
- Security headers are configured
- Database credentials are externalized

## 📝 Customization

### Adding New Services

1. Add service to `docker-compose.yml`
2. Update `docker-compose.dev.yml` if needed
3. Add any necessary configuration files

### Modifying PHP Extensions

Edit `docker/php/Dockerfile` to add/remove PHP extensions:

```dockerfile
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd
```

### Custom Nginx Configuration

Modify `docker/nginx/conf.d/app.conf` for custom routing or headers.

## 🐛 Troubleshooting

### Common Issues

1. **Port conflicts**: Change ports in `docker-compose.yml`
2. **Permission issues**: Run `chmod -R 755 src/storage src/bootstrap/cache`
3. **Database connection**: Check environment variables and MySQL service status
4. **Nginx errors**: Check logs with `docker-compose logs nginx`

### Logs

```bash
# View all logs
docker-compose logs

# View specific service logs
docker-compose logs app
docker-compose logs nginx
docker-compose logs mysql
```

## 🤝 Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Test thoroughly
5. Submit a pull request

## 📄 License

This project is open-sourced software licensed under the [MIT license](LICENSE).

## 🙏 Acknowledgments

- [Laravel](https://laravel.com/) - The PHP framework
- [Docker](https://www.docker.com/) - Containerization platform
- [Render](https://render.com/) - Cloud deployment platform

---

**Happy Coding! 🎉**
Report a correction

Explore similar templates

Compare previews and descriptions within the same stack and category.