PHPackages                             systemsdk/docker-nginx-php-laravel - 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. [Database &amp; ORM](/categories/database)
4. /
5. systemsdk/docker-nginx-php-laravel

ActiveProject[Database &amp; ORM](/categories/database)

systemsdk/docker-nginx-php-laravel
==================================

Docker laravel environment

v5.0.0(1mo ago)345487119MITPHPPHP ^8.5CI passing

Since Dec 26Pushed 1mo ago17 watchersCompare

[ Source](https://github.com/systemsdk/docker-nginx-php-laravel)[ Packagist](https://packagist.org/packages/systemsdk/docker-nginx-php-laravel)[ Docs](https://github.com/systemsdk/docker-nginx-php-laravel)[ GitHub Sponsors](https://github.com/sponsors/systemsdk)[ Fund](https://opencollective.com/systemsdk-engineering)[ RSS](/packages/systemsdk-docker-nginx-php-laravel/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (10)Dependencies (24)Versions (29)Used By (0)

PHP Laravel environment
=======================

[](#php-laravel-environment)

Docker environment required to run Laravel (based on official php and mysql docker hub repositories).

[![Actions Status](https://github.com/systemsdk/docker-nginx-php-laravel/workflows/Laravel%20App/badge.svg)](https://github.com/systemsdk/docker-nginx-php-laravel/actions)[![CircleCI](https://camo.githubusercontent.com/9168b42efcf9932541761d1c344304691d695d08a85274089d0dea8c02d61cdf/68747470733a2f2f636972636c6563692e636f6d2f67682f73797374656d73646b2f646f636b65722d6e67696e782d7068702d6c61726176656c2e7376673f7374796c653d737667)](https://circleci.com/gh/systemsdk/docker-nginx-php-laravel)[![Coverage Status](https://camo.githubusercontent.com/48d9d2841cf4046b145cd37f2c999ce2a3db63b218ee392d2cfc76cab3efa364/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f73797374656d73646b2f646f636b65722d6e67696e782d7068702d6c61726176656c2f62616467652e737667)](https://coveralls.io/github/systemsdk/docker-nginx-php-laravel)[![Latest Stable Version](https://camo.githubusercontent.com/c9bff2e8a66acfa2bbb9ea21fe3bc0c022791cc8054fbca5f88939916f35b13d/68747470733a2f2f706f7365722e707567782e6f72672f73797374656d73646b2f646f636b65722d6e67696e782d7068702d6c61726176656c2f76)](https://packagist.org/packages/systemsdk/docker-nginx-php-laravel)[![Total Downloads](https://camo.githubusercontent.com/962c00f1b0e76874262df6698b3ca3aea0d69108c6aae20149f5cd1cda12c58e/68747470733a2f2f706f7365722e707567782e6f72672f73797374656d73646b2f646f636b65722d6e67696e782d7068702d6c61726176656c2f646f776e6c6f616473)](https://packagist.org/packages/systemsdk/docker-nginx-php-laravel)[![MIT licensed](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

[Source code](https://github.com/systemsdk/docker-nginx-php-laravel.git)

Requirements
------------

[](#requirements)

- Docker Engine version 23.0 or later
- Docker Compose version 2.0 or later
- An editor or IDE
- MySQL Workbench

Note: OS recommendation - Linux Ubuntu based.

Components
----------

[](#components)

1. Nginx 1.29
2. PHP 8.5 fpm
3. MySQL 8
4. Laravel 13
5. Mailpit (only for debug emails on dev environment)

Setting up Docker Engine with Docker Compose
--------------------------------------------

[](#setting-up-docker-engine-with-docker-compose)

For installing Docker Engine with docker compose please follow steps mentioned on page [Docker Engine](https://docs.docker.com/engine/install/).

Note 1: Please run next cmd after above step if you are using Linux OS: `sudo usermod -aG docker $USER`

Note 2: If you are using Docker Desktop for MacOS 12.2 or later - please enable [virtiofs](https://www.docker.com/blog/speed-boost-achievement-unlocked-on-docker-desktop-4-6-for-mac/) for performance (enabled by default since Docker Desktop v4.22).

Setting up DEV environment
--------------------------

[](#setting-up-dev-environment)

1.You can clone this repository from GitHub or install via composer.

Note: Delete `storage/mysql-data` folder if it exists.

If you have installed composer and want to install environment via composer, you can use the next cmd command:

```
composer create-project systemsdk/docker-nginx-php-laravel example-app
```

2.Add domain to local `hosts` file:

```
127.0.0.1    localhost
```

3.Configure `/docker/dev/xdebug-main.ini` (Linux/Windows) or `/docker/dev/xdebug-osx.ini` (MacOS) (optional):

- In case you need debug only requests with IDE KEY: PHPSTORM from frontend in your browser:

```
xdebug.start_with_request = no
```

Install locally in Firefox extension "Xdebug helper" and set in settings IDE KEY: PHPSTORM

- In case you need to debug any request to an api (by default):

```
xdebug.start_with_request = yes
```

4.Build, start and install the docker images from your terminal:

```
make build
make start
make composer-install
make env-dev
```

Note 1: If you want to change default docker configurations (web\_port, etc...) - open `.env` file, edit necessary environment variable value and stop, rebuild, start docker containers.

Note 2: If you are changing `.env` file and such env params like `MYSQL_VERSION`, `MYSQL_ROOT_PASSWORD`, don't forget to stop docker containers and delete `storage/mysql-data` folder before rebuild docker images.

5.Make sure that you have installed migrations/seeds:

```
make migrate
make seed
```

6.Set key for application:

```
make key-generate
```

7.In order to use this application, please open in your browser next urls:

-
- [http://localhost:8025 (Mailpit)](http://localhost:8025)

Setting up STAGING environment locally
--------------------------------------

[](#setting-up-staging-environment-locally)

1.You can clone this repository from GitHub or install via composer.

Note: Delete `storage/mysql-data` and `vendor` folder if it is exists.

If you have installed composer and want to install environment via composer you can use next cmd command:

```
composer create-project systemsdk/docker-nginx-php-laravel example-app
```

Note: If you want to change default docker configurations (web\_port, etc...) - create uncommitted `.env` file, copy data from `.env.staging`, edit necessary environment variable value.

2.Build, start and install the docker images from your terminal:

```
make build-staging
make start-staging
```

3.Make sure that you have installed migrations:

```
make migrate-no-test
```

4.Set key for application:

```
make key-generate
```

Setting up PROD environment locally
-----------------------------------

[](#setting-up-prod-environment-locally)

1.You can clone this repository from GitHub or install via composer.

Note: Delete `storage/mysql-data` and `vendor` folder if it is exists.

If you have installed composer and want to install environment via composer you can use next cmd command:

```
composer create-project systemsdk/docker-nginx-php-laravel example-app
```

2.Edit `compose-prod.yaml` and set necessary user/password for MySQL.

3.Edit `env.prod` and set necessary user/password for MySQL.

Note: If you want to change default docker configurations (web\_port, etc...) - create uncommitted `.env` file, copy data from `.env.prod`, edit necessary environment variable value.

4.Build, start and install the docker images from your terminal:

```
make build-prod
make start-prod
```

5.Make sure that you have installed migrations:

```
make migrate-no-test
```

6.Set key for application:

```
make key-generate
```

Getting shell to container
--------------------------

[](#getting-shell-to-container)

After application will start (`make start`) and in order to get shell access inside laravel container you can run following command:

```
make ssh
```

Note 1: Please use next make commands in order to enter in other containers: `make ssh-nginx`, `make ssh-supervisord`, `make ssh-mysql`.

Note 2: Please use `exit` command in order to return from container's shell to local shell.

Building containers
-------------------

[](#building-containers)

In case you edited Dockerfile or other environment configuration you'll need to build containers again using next commands:

```
make down
make build
make start
```

Note: Please use environment-specific commands if you need to build test/staging/prod environment, more details can be found using help `make help`.

Start and stop environment containers
-------------------------------------

[](#start-and-stop-environment-containers)

Please use next make commands in order to start and stop environment:

```
make start
make stop
```

Note 1: For staging environment need to be used next make commands: `make start-staging`, `make stop-staging`.

Note 2: For prod environment need to be used next make commands: `make start-prod`, `make stop-prod`.

Stop and remove environment containers, networks
------------------------------------------------

[](#stop-and-remove-environment-containers-networks)

Please use next make commands in order to stop and remove environment containers, networks:

```
make down
```

Note: Please use environment-specific commands if you need to stop and remove test/staging/prod environment, more details can be found using help `make help`.

Additional main command available
---------------------------------

[](#additional-main-command-available)

```
make build
make build-test
make build-staging
make build-prod

make start
make start-test
make start-staging
make start-prod

make stop
make stop-test
make stop-staging
make stop-prod

make down
make down-test
make down-staging
make down-prod

make restart
make restart-test
make restart-staging
make restart-prod

make env-dev
make env-test-ci

make ssh
make ssh-root
make fish
make ssh-nginx
make ssh-supervisord
make ssh-mysql

make composer-install-no-dev
make composer-install
make composer-update
make composer-audit

make key-generate

make info
make help

make logs
make logs-nginx
make logs-supervisord
make logs-mysql

make drop-migrate
make migrate-no-test
make migrate

make seed

make phpunit
make report-code-coverage

make phpcs
make ecs
make ecs-fix
make phpmetrics
make phpcpd
make phpcpd-html-report
make phpmd
make phpstan
make phpinsights

etc....
```

Notes: Please see more commands in Makefile

Architecture &amp; packages
---------------------------

[](#architecture--packages)

- [Laravel](https://laravel.com)
- [phpunit](https://github.com/sebastianbergmann/phpunit)
- [laravel-ide-helper](https://github.com/barryvdh/laravel-ide-helper)
- [scriptsdev](https://github.com/neronmoon/scriptsdev)
- [composer-bin-plugin](https://github.com/bamarni/composer-bin-plugin)
- [ergebnis/composer-normalize](https://github.com/ergebnis/composer-normalize)
- [composer-unused](https://packagist.org/packages/icanhazstring/composer-unused)
- [composer-require-checker](https://packagist.org/packages/maglnet/composer-require-checker)
- [security-advisories](https://github.com/Roave/SecurityAdvisories)
- [php-coveralls](https://github.com/php-coveralls/php-coveralls)
- [easy-coding-standard](https://github.com/Symplify/EasyCodingStandard)
- [PhpMetrics](https://github.com/phpmetrics/PhpMetrics)
- [phpcpd](https://packagist.org/packages/systemsdk/phpcpd)
- [phpmd](https://packagist.org/packages/phpmd/phpmd)
- [phpstan](https://packagist.org/packages/nunomaduro/larastan)
- [phpinsights](https://packagist.org/packages/nunomaduro/phpinsights)
- [rector](https://packagist.org/packages/rector/rector)

Guidelines
----------

[](#guidelines)

- [Commands](docs/commands.md)
- [Development](docs/development.md)
- [Testing](docs/testing.md)
- [IDE PhpStorm configuration](docs/phpstorm.md)
- [Xdebug configuration](docs/xdebug.md)

Working on your project
-----------------------

[](#working-on-your-project)

1. For new feature development, fork `develop` branch into a new branch with one of the two patterns:
    - `feature/{ticketNo}`
2. Commit often, and write descriptive commit messages, so it's easier to follow steps taken when reviewing.
3. Push this branch to the repo and create pull request into `develop` to get feedback, with the format `feature/{ticketNo}` - "Short descriptive title of Jira task".
4. Iterate as needed.
5. Make sure that "All checks have passed" on CircleCI(or another one in case you are not using CircleCI) and status is green.
6. When PR is approved, it will be squashed &amp; merged, into `develop` and later merged into `release/{No}` for deployment.

Note: You can find git flow detail example [here](https://danielkummer.github.io/git-flow-cheatsheet).

License
-------

[](#license)

[The MIT License (MIT)](LICENSE)

###  Health Score

62

—

FairBetter than 99% of packages

Maintenance99

Actively maintained with recent releases

Popularity36

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity77

Established project with proven stability

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

Recently: every ~87 days

Total

28

Last Release

33d ago

Major Versions

v1.0.0 → v2.0.02022-05-07

v2.4.0 → v3.0.02023-01-21

v3.4.0 → v4.0.02024-06-10

v4.4.3 → v5.0.02026-04-05

PHP version history (6 changes)v1.0.0PHP ^8.0

v2.0.0PHP ^8.1

v3.0.0PHP ^8.2

v3.4.0PHP ^8.3

v4.3.0PHP ^8.4

v5.0.0PHP ^8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/33e0fb1bc5cd58d4a1d671f46cd90d2d922ec5392f91b87ea346dcb82716b637?d=identicon)[dimadeush](/maintainers/dimadeush)

---

Top Contributors

[![dimadeush](https://avatars.githubusercontent.com/u/4595354?v=4)](https://github.com/dimadeush "dimadeush (1 commits)")

---

Tags

bitbucket-pipelinescirclecicrondockergithub-actionslaravellaravel13multi-environmentmysqlmysql8nginxphpphp8sslsupervisordubuntuxdebugphplaravelmysqldockernginxsupervisord

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/systemsdk-docker-nginx-php-laravel/health.svg)

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

###  Alternatives

[matthew-p/docker-server

Universal docker server, Nginx, PHP-FPM, MySql, Redis

112.8k](/packages/matthew-p-docker-server)[maikealame/laravel-auto

Laravel helper to make almost everything for your project

424.7k](/packages/maikealame-laravel-auto)[chr15k/laravel-mysql-encrypt

Laravel database encryption using native MySQL functions

119.9k](/packages/chr15k-laravel-mysql-encrypt)

PHPackages © 2026

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