Laradock is a complete web development environment for Docker, which was born to meet the development of Laravel systems and currently provides containers for various situations for PHP development.
It supports a variety of common services, all pre-configured to provide a PHP development environment, [Laravel]({<Relref “Laravel”>}}), WordPress, Joomla, Drupal, Cakephp, among others, and totally ready to up and ease use.
In this introductory article you will have an overview of the project, the features of Laradock, and a quick configuration explanation. To go further with it’s use and settings read the tutorials accessible by the section menu.
What is the Laradock
Laradock is an Open Source project created to facilitate the configuration of Docker containers to be used in software development environments and application production for system projects developed in PHP and frameworks such as Laravel and Symphony.
A series of resources and services are available, with installation and copnfiguration through .env
files that allow
configure the Docker containers according to the need for each of your projects.
Laradock resources
- Easy choice between PHP versions: 8.0, 7.4, 7.3, 7.2, 7.1, 5.6, 5.3 … (e above)
- Simple choice of database engine: MySQL, Postgres, MariaDB, MongoDB, among others
- Execution of your own stack: Memcached, HHVM, RabbitMQ …
- Each software is executed on its own container: PHP-FPM, NGINX, PHP-CLI …
- Easy to customize any container, with simple editions in the Dockerfile configuration file.
- All images extend from an official base image - Reliable base images.
- Pre-configured NGINX to host any code in your root directory.
- POSSIBILITY TO USE LARADOCK BY PROJECT OR A SINGLE LARADOCK FOR ALL PROJECTS.
- Easy to install / remove software in containers using environmental variables.
- Clean and well-structured dockerfiles configuration files.
- The latest version of the docker compose (Docker-Compose) file.
- Transparent, visible and editable configuration.
- Quick images of images.
Quick Laradock Setup for PHP Laravel
Quick overview of how it is simple to configure our PHP, NGINX, MySQL, Redis and Composer Development Stack for executing a Laravel project:
1 - Clone Laradock project within your PHP project:
git clone https://github.com/Laradock/laradock.git
2 - Visit the laradock
folder and rename the file .env.example
to .env
.
cd laradock
cp .env.example .env
3 - Run your containers:
docker-compose up -d nginx mysql phpmyadmin redis workspace
4 - Open the .env
file of your Laravel project 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, your environment is configured and running a MySQL server with PHP, NGINX and Redis.
You can choose which tools to install in your workspace container and other containers from the .env
file.
If you modify the docker-compose.yml
file, .env
or any dockerfile file, you should rebuild your containers so that the changes have an effect on the execution instance.
Services, libraries and packages supported by Laradock
Laradock follows the principle of “separation of interests” (Separation of Concerns), therefore, performs each software on its own Docker container.
You can turn on/off as many instances you want without worrying about the settings.
To execute a container chosen in the list below, run the following command:
docker-compose up -d {container-name}
The name of the container {container-name}
is equal to the name of the folder of the service/software you want to run the container.
For example, to run the “PHP FPM” container, use the name “php-fpm”.
Following is a list of software and services supported at the time this article was written:
Web servers
- NGINX
- Apache2
- Caddy
Load balancing
- HAProxy
- Traefik
PHP compilers
- PHP FPM
- HHVM
Database Management Systems
- MySQL
- PostgreSQL
- PostGIS
- MariaDB
- Percona
- MSSQL
- MongoDB
- MongoDB Web UI
- Neo4j
- CouchDB
- RethinkDB
- Cassandra
Database Management Applications (Clients)
- PhpMyAdmin
- Administrador
- PgAdmin
Cache engines
- Redis
- Redis Web UI
- Cluster Redis
- Memcached
- Aerospike
- Verniz
Message brokers (Message Managers)
- RabbitMQ
- RabbitMQ Admin Console
- Beanstalkd
- Beanstalkd Admin Console
- Eclipse Mosquitto
- PHP Worker
- Laravel Horizon
- Gearman
- Amazon Simple Queue Service
Email servers
- Mailu
- MailCatcher
- Mailhog
- MailDev
Log management
- GrayLog
Tests
- Selenium
Monitoring
- Grafana
- NetData
Search engines
- ElasticSearch
- Apache Solr
- Manticore Search
IDEs
- ICE Coder
- Theia
- Web IDE
Several others
- Workspace - Working space (Laradock container that includes a rich set of pre-configured useful tools)
- PHP CLI
- Compositor
- Git
- Vim
- xDebug
- Linuxbrew
- Node
- V8JS
- Gulp
- SQLite
- Laravel Envoy
- Deployer
- Yarn
- SOAP
- Drush
- WordPress CLI
- Apache ZooKeeper: centralized service for systems distributed in a hierarchical key value storage
- Kibana: Visualize ElasticSearch data and navigate Elastic Stack
- Dejavu: edit your ElasticSearch data
- LogStash: data processing channel on the server side that receives and processes data from a multitude of sources simultaneously
- Jenkins: automation server, which provides plug-ins to support the construction, deployment and automation of any project
- Certbot: HTTPS enabled automatically on your website
- Swoole: asynchronous programming framework of production level with corotine, parallelism, for PHP
- SonarQube: Continuous code quality inspection to perform automatic revisions with static code analysis to detect bugs and more
- Gitlab: a single application for the entire software development life cycle
- PostGIS: Database extension for PostgreSQL. Add support for geographical objects, allowing location queries to be executed in SQL
- Blackfire: enables all PHP and IT / OPS developers to continuously check the performance of their applications
- Laravel Echo: The power of Websockets in their Laravel apps
- Mercure: Server-Side events
- Phalcon: PHP Framework based on Model-View-Controller standard
- Minio: Cloud storage server released under Apache License V2, compatible with Amazon S3
- AWS EB CLI: CLI that helps implement and manage your AWS Elastic Beanstalk applications and environments
- Thumbor: photo miniature service
- IPython: provides a rich architecture for interactive computing
- Jupyter Hub: Jupyter notebook for multiple users
- Portainer: Build and manage your Docker environments easily
- Docker Registry: The implementation of Docker Registry to store and distribute Docker images
- Docker Web UI: a browser-based solution to navigate and modify a private Docker record
Conclusions
The project is Open-Source, and if you do not find the configuration of a software you want to see in Laradock, it is welcome to contribute with an improvement.
Continue the sequence of tutorials by the article that details the Laradock Installation and Configuration and Configuration.
Comments