Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laravel-fans/laravel-docker
Full Laravel production environment for Docker
https://github.com/laravel-fans/laravel-docker
composer docker laravel
Last synced: 3 days ago
JSON representation
Full Laravel production environment for Docker
- Host: GitHub
- URL: https://github.com/laravel-fans/laravel-docker
- Owner: laravel-fans
- License: mit
- Created: 2020-09-01T03:33:32.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-30T03:38:11.000Z (3 months ago)
- Last Synced: 2024-10-30T06:25:07.069Z (3 months ago)
- Topics: composer, docker, laravel
- Language: PHP
- Homepage: https://packagist.org/packages/laravel-fans/docker
- Size: 2.17 MB
- Stars: 38
- Watchers: 4
- Forks: 12
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Docker
[![codecov](https://codecov.io/gh/laravel-fans/laravel-docker/branch/main/graph/badge.svg)](https://codecov.io/gh/laravel-fans/laravel-docker)
[![Packagist Downloads](https://img.shields.io/packagist/dt/laravel-fans/docker)](https://packagist.org/packages/laravel-fans/docker)
[![Docker Pulls](https://img.shields.io/docker/pulls/laravelfans/laravel)](https://hub.docker.com/r/laravelfans/laravel)
[![Laravel 10](https://github.com/laravel-fans/laravel-docker/workflows/Laravel%2010/badge.svg)](https://github.com/laravel-fans/laravel-docker/actions/workflows/laravel-10.yml)
[![Laravel 11](https://github.com/laravel-fans/laravel-docker/workflows/Laravel%2011/badge.svg)](https://github.com/laravel-fans/laravel-docker/actions/workflows/laravel-11.yml)Full Laravel production and development environment for Docker, based on the official image `php:apache`.
## development or testing
It is recommended to use this docker image in your testing environment(amd64 or arm64, support Apple silicon), it contains git/jq/vim/nodejs/npm, and php extensions: gd/mysql/pgsql/redis/xdebug.
```shell
docker run -p 8000:80 -v $(pwd):/var/www/laravel laravelfans/laravel:11-dev
docker run -v $(pwd):/var/www/laravel -it laravelfans/laravel:10-dev bash
```## production
It is recommended to use `Dockerfile` to build your own docker image in your production environment.
```shell
composer require --dev laravel-fans/docker
php artisan docker:publish
```Then you will find `Dockerfile` in your project, so you can build:
```
docker build -t laravel-demo .
docker run -it laravel-demo
docker run -p 8000:80 -e "APP_ENV=local" -e "DB_CONNECTION=sqlite" \
-e "APP_KEY=base64:L+3avOYCfuq8nnDpHs74+5Et3sx27TssucHQIyqfpDY=" \
-it laravel-demo
```Feel free to change the `Dockerfile`.
## screenshots
![docker run laravel](https://user-images.githubusercontent.com/4971414/126929099-20fee54e-89e8-4d52-8c04-41eeab7ede2d.png)