PHPackages                             sammyjo20/easy-laravel-docker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. sammyjo20/easy-laravel-docker

ActiveProject[DevOps &amp; Deployment](/categories/devops)

sammyjo20/easy-laravel-docker
=============================

v0.5.0(1mo ago)414MITPHPPHP ^8.4CI passing

Since Sep 1Pushed 1mo agoCompare

[ Source](https://github.com/Sammyjo20/easy-laravel-docker)[ Packagist](https://packagist.org/packages/sammyjo20/easy-laravel-docker)[ RSS](/packages/sammyjo20-easy-laravel-docker/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (10)Versions (8)Used By (0)

Easy Laravel Docker
-------------------

[](#easy-laravel-docker)

This project aims to give you an easy way to deploy your Laravel application to a Docker-based host super quickly. The image and Dockerfile used is all production ready and ready to serve traffic directly or via a proxy (recommended). This is made for people wanting to host Laravel on their Homelabs or just simply on a server with Docker on.

Note

Please note that this package is still new and probably has parts which can be improved. If you do find anything, please contribute by opening a pull-request!

### Prerequisites

[](#prerequisites)

This project assumes you have some basic to intermediate knowledge of Docker. This project also uses the [serversideup/php](https://serversideup.net/open-source/docker-php/) images so you should refer to their documentation when modifying the Dockerfile.

### Installation

[](#installation)

To get started, install the package via Composer using the command below.

```
composer require sammyjo20/easy-laravel-docker --dev

```

> Requires PHP 8.4+ and Laravel 12+

### Getting Started

[](#getting-started)

Once the package has been installed, you can run the command below. This will ask you a few questions like which database engine you would like to use. If you are using a separate database in production, you can choose "None".

```
php artisan install:docker

```

#### Application Name

[](#application-name)

One of the first questions the command will ask you is your application name. This name will be used to define the name of the image used.

#### Web Port

[](#web-port)

This will be the port that the web service will run on the host machine. We recommend using a port other than port 80 and 443.

#### Environment

[](#environment)

The docker container will use the `.env` that is stored on the host machine.

### After Running The Command

[](#after-running-the-command)

After the command has run, you will need to build your first image on the machine. All you have to do is run the following command

```
docker build -t {my-application} .

```

This will create an image. After this you will be able to run the application.

### Running the applications

[](#running-the-applications)

Simply type the following

```
docker compose up

```

or

```
docker compose up -d

```

### MySQL Configuration

[](#mysql-configuration)

If you have chosen to use the MySQL variant, you will need to update the `DOCKER_DB_PASSWORD` variable. While by default the docker container isn't exposed to a host port, it's good security practice to set a good password within the container.

When you run `docker compose up` you may get an error saying the database couldn't connect. This is because you need to update your `.env` to point to the docker container's host and password. To do this simply change the `DB_HOST` to `my-application-mysql` (replacing my-application with the name you entered in the command) - also make sure the `DB_USERNAME` is set to "root" and the `DB_PASSWORD` matches your `DOCKER_DB_PASSWORD` variable.

### SQLite Configuration

[](#sqlite-configuration)

By default, a fresh SQLite database will be created and stored in the `database` volume for the project. This is a named volume which will persist.

### Scheduler &amp; Queue

[](#scheduler--queue)

This package provides configuration for a Laravel Scheduler and Queue out of the box. Simply comment out the lines in the docker-compose file if you would like to use a scheduler and queue for the application.

### Deployments

[](#deployments)

A convenient `deploy.sh` has been provided in this framework. You can run this on your host to automatically pull from your main branch and rebuild the Docker container.

### Proxies

[](#proxies)

It's recommended to reverse proxy traffic into the port of the web container rather than running the container directly on port 80 or 443. You can use the `TRUSTED_PROXIES` .env variable to restrict traffic to specific CIDR ranges or IPs.

Also... bring your own configuration!
-------------------------------------

[](#also-bring-your-own-configuration)

This is just a starting point to get your application live as quickly as possible. Once this package has created the baseline files, configure away.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance90

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~52 days

Recently: every ~65 days

Total

6

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/de41c8bfde9d0edb25da9fdc159283fe9442e3dc9b651ee9aa7ded8384e5629d?d=identicon)[SamCarre](/maintainers/SamCarre)

---

Top Contributors

[![Sammyjo20](https://avatars.githubusercontent.com/u/29132017?v=4)](https://github.com/Sammyjo20 "Sammyjo20 (18 commits)")

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/sammyjo20-easy-laravel-docker/health.svg)

```
[![Health](https://phpackages.com/badges/sammyjo20-easy-laravel-docker/health.svg)](https://phpackages.com/packages/sammyjo20-easy-laravel-docker)
```

###  Alternatives

[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M194](/packages/laravel-ai)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M151](/packages/laravel-mcp)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

725173.2k14](/packages/tallstackui-tallstackui)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[mike-bronner/laravel-model-caching

Automatic caching for Eloquent models.

2.4k91.9k1](/packages/mike-bronner-laravel-model-caching)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
