Skip to content

alireaza/dockerized-laravel

Repository files navigation

Dockerized Laravel based on LEP

Laravel application in a Docker container

Install

Via Composer

$ git clone https://github.com/alireaza/dockerized-laravel.git laravel
$ cd laravel
$ CURRENT_UID=$(id -u):$(id -g) docker-compose up --detach --build

Some useful commands

Start services

$ CURRENT_UID=$(id -u):$(id -g) docker-compose up --detach --build

Stop services

$ CURRENT_UID=$(id -u):$(id -g) docker-compose down

Fix services permissions

$ sudo chown -R $(id -u):$(id -g) {./nginx/,./php/,./src/}

Nginx Log

$ docker-compose logs --tail 100 --follow nginx

Nginx CLI

$ docker-compose exec nginx nginx -h

PHP Log

$ docker-compose logs --tail 100 --follow php

PHP CLI

$ docker-compose exec --user $(id -u):$(id -g) php php -h

Composer CLI

$ docker-compose exec --user $(id -u):$(id -g) php composer -h

Run dbgpProxy

$ docker-compose exec php /usr/bin/dbgpProxy --server 0.0.0.0:9003 --client 0.0.0.0:9001

Laravel artisan CLI:

$ docker-compose exec --user $(id -u):$(id -g) php php artisan

Fix Laravel storage permission:

$ docker-compose exec --user root php chown -R www-data:www-data /var/www/html/storage

License

The MIT License (MIT). Please see License File for more information.

Releases

No releases published

Sponsor this project

Packages

No packages published