Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alireaza/dockerized-laravel
Laravel application in a Docker container
https://github.com/alireaza/dockerized-laravel
composer docker docker-compose laravel nginx php shell
Last synced: 27 days ago
JSON representation
Laravel application in a Docker container
- Host: GitHub
- URL: https://github.com/alireaza/dockerized-laravel
- Owner: alireaza
- License: mit
- Created: 2022-10-28T04:11:29.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-15T06:57:41.000Z (almost 2 years ago)
- Last Synced: 2024-05-21T05:03:39.985Z (8 months ago)
- Topics: composer, docker, docker-compose, laravel, nginx, php, shell
- Language: PHP
- Homepage:
- Size: 245 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Dockerized Laravel based on [LEP](https://github.com/alireaza/lep)
Laravel application in a Docker container## Install
Via Composer
```bash
$ 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
```bash
$ CURRENT_UID=$(id -u):$(id -g) docker-compose up --detach --build
```#### Stop services
```bash
$ CURRENT_UID=$(id -u):$(id -g) docker-compose down
```#### Fix services permissions
```bash
$ sudo chown -R $(id -u):$(id -g) {./nginx/,./php/,./src/}
```#### Nginx Log
```bash
$ docker-compose logs --tail 100 --follow nginx
```#### Nginx CLI
```bash
$ docker-compose exec nginx nginx -h
```#### PHP Log
```bash
$ docker-compose logs --tail 100 --follow php
```#### PHP CLI
```bash
$ docker-compose exec --user $(id -u):$(id -g) php php -h
```#### Composer CLI
```bash
$ docker-compose exec --user $(id -u):$(id -g) php composer -h
```#### Run dbgpProxy
```bash
$ docker-compose exec php /usr/bin/dbgpProxy --server 0.0.0.0:9003 --client 0.0.0.0:9001
```#### Laravel artisan CLI:
```bash
$ docker-compose exec --user $(id -u):$(id -g) php php artisan
```#### Fix Laravel storage permission:
```bash
$ 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](LICENSE) for more information.