https://github.com/cploutarchou/laravel-dev-infrastructure
A Skeleton instance for laravel dockerized application.
https://github.com/cploutarchou/laravel-dev-infrastructure
docker docker-compose dockerfile laravel laravel-framework laravel-package nginx php7 redis skeleton-application
Last synced: 3 months ago
JSON representation
A Skeleton instance for laravel dockerized application.
- Host: GitHub
- URL: https://github.com/cploutarchou/laravel-dev-infrastructure
- Owner: cploutarchou
- Created: 2021-01-27T17:20:58.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-19T09:32:23.000Z (about 5 years ago)
- Last Synced: 2025-04-09T12:11:15.582Z (about 1 year ago)
- Topics: docker, docker-compose, dockerfile, laravel, laravel-framework, laravel-package, nginx, php7, redis, skeleton-application
- Language: Shell
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Containerize a Laravel Application
# HOW TO:
## Requirements :
* Docker install instructions [link](https://docs.docker.com/engine/install/)
* docker-compose install instructions [link](https://docs.docker.com/compose/install/)
* php composer install instructions [link](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos)
* nodejs install instructions [link](https://nodejs.org/en/download/)
## What you get :
1. nginx v1.19.6
1. mysql v8.0
1. php 7.4-fpm
1. redis server v6.0.10
_______________
## Steps :
1. Run --> `composer create-project laravel/laravel example-app`
1. Wait until the composer create the project.
1. Copy the contents of .env.sample content to .env file.
1. Run --> `composer update`
1. Copy the contents of example-app to root directory
1. Run php artisan key:generate to generate new app key
1. Build docker-compose run --> `docker-compose up -d`
1. You can access laravel application at http://172.22.1.22
1. If you get ERROR 500 Check for .env file if file not exists rename .env.sample to .env
1. And run php artisan key:generate to generate new app key
**Mysql Settings:**
* DB_HOST=172.22.1.25
* DB_PORT=3306
* DB_DATABASE=laravel
* DB_USERNAME=laravel
* DB_PASSWORD=laravel
**Redis Settings:**
* REDIS_HOST=172.22.1.23
* REDIS_PASSWORD=
* REDIS_PORT=6379
## Tips:
> If you want to pause your Docker Compose environment while keeping the state of all its services, run:
`docker-compose pause
`
> You can then resume your services with:
> `docker-compose unpause`
> To shut down your Docker Compose environment and remove all of its containers, networks, and volumes, run: `docker-compose down`
> If you want to recreate your Docker Compose environment , run: `docker-compose up --force-recreate`