This is a Docker template that provides an environment with Laravel, Nginx, MySQL and Redis.
- Docker
- docker-compose
Run server:
$ docker-compose up
Go to http://localhost
and you'll see the website.
Clone repository:
$ git clone https://github.com/PiroHiroPiro/docker_template_laravel_nginx_mysql_redis.git
$ cd docker_template_laravel_nginx_mysql_redis
Copy env files:
$ cp ./docker/php/.env.example ./docker/php/.env
$ cp ./docker/mysql/.env.example ./docker/mysql/.env
Enter the database name and root user password in the copied env files ./docker/php/.env
and ./docker/mysql/.env
:
Create new Laravel application:
$ docker-compose exec php laravel new [YOUR APPLICATION NAME]
Change project name:
...
root /src/[YOUR APPLICATION NAME]/public;
...
Build images:
$ docker network create laravel_network
$ docker-compose build
This software is released under the MIT License, see LICENSE.