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.4.1(3mo ago)413MITPHPPHP ^8.4CI passing

Since Sep 1Pushed 3mo 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 1mo ago

READMEChangelog (5)Dependencies (5)Versions (6)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

38

—

LowBetter than 85% of packages

Maintenance80

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

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 ~37 days

Total

5

Last Release

104d 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 (17 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

[sammyjo20/lasso

Lasso - Asset wrangling for Laravel made simple.

355347.9k](/packages/sammyjo20-lasso)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[aaronfrancis/airdrop

A Laravel package to deploy your application faster by skipping asset compilation when possible.

19594.9k](/packages/aaronfrancis-airdrop)[richdynamix/arc

Production ready docker based development environment for your Laravel project.

1163.1k](/packages/richdynamix-arc)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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