1. Introduction
Laradock is a full PHP development environment based on Docker.
Supporting a variety of common services, all pre-configured to provide a full PHP development environment.
Features
- Easy switch between PHP versions: 7.3, 7.2, 7.1, 5.6…
- Choose your favorite database engine: MySQL, Postgres, MariaDB…
- Run your own stack: Memcached, HHVM, RabbitMQ…
- Each software runs on its own container: PHP-FPM, NGINX, PHP-CLI…
- Easy to customize any container, with simple edit to the
Dockerfile
. - All Images extends from an official base Image. (Trusted base Images).
- Pre-configured NGINX to host any code at your root directory.
- Can use Laradock per project, or single Laradock for all projects.
- Easy to install/remove software’s in Containers using environment variables.
- Clean and well structured Dockerfiles (
Dockerfile
). - Latest version of the Docker Compose file (
docker-compose
). - Everything is visible and editable.
- Fast Images Builds.
Use Docker First - Then Learn About It Later
Quick Overview
Let’s see how easy it is to setup our demo stack
PHP
, NGINX
, MySQL
, Redis
and Composer
:
1 - Clone Laradock inside your PHP project:
git clone https://github.com/Laradock/laradock.git
2 - Enter the laradock folder and rename
env-example
to .env
.cp env-example .env
3 - Run your containers:
- (Make sure you already have installed Docker on your PC - Click here to install Docker)
- (Make sure you already have installed Docker Compose on your PC - Click here to install Docker Compose)
docker-compose up -d nginx mysql
OR
docker-compose up -d nginx mysql phpmyadmin redis workspace
4 - Open your project’s
.env
file and set the following:DB_HOST=mysql
REDIS_HOST=redis
QUEUE_HOST=beanstalkd
5 - Open your browser and visit localhost:
http://localhost
.That's it! enjoy :)
Note : Paste this code to your terminal from your Laradock Folder - To run Laradock on your machine - sudo docker-compose up -d nginx redis laravel-horizon mysql
Credit : https://laradock.io/
This is for personal documentation purposes.
Comments
Post a Comment