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.4, 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:
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 :)
Supported Software (Docker Images)
Laradock, adheres to the ‘separation of concerns’ principle, thus it runs each software on its own Docker Container. You can turn On/Off as many instances as you want without worrying about the configurations.
To run a chosen container from the list below, run
docker-compose up -d {container-name}
. The container name{container-name}
is the same as its folder name. Example to run the “PHP FPM” container use the name “php-fpm”.
Web Servers:
- NGINX
- Apache2
- Caddy
Load Balancers:
- 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 Apps:
- PhpMyAdmin
- Adminer
- PgAdmin
Cache Engines:
- Redis
- Redis Web UI
- Redis Cluster
- Memcached
- Aerospike
- Varnish
- Redis
Message Brokers:
- RabbitMQ
- RabbitMQ Admin Console
- Beanstalkd
- Beanstalkd Admin Console
- Eclipse Mosquitto
- PHP Worker
- Laravel Horizon
- Gearman
- RabbitMQ
Mail Servers:
- Mailu
- Mailhog
- MailDev
Log Management:
- GrayLog
Testing:
- Selenium
Monitoring:
- Grafana
- NetData
Search Engines:
- ElasticSearch
- Apache Solr
- Manticore Search
IDE’s
- ICE Coder
- Theia
- Web IDE
Miscellaneous:
- Workspace (Laradock container that includes a rich set of pre-configured useful tools)
PHP CLI
Composer
Git
Vim
xDebug
Linuxbrew
Node
V8JS
Gulp
SQLite
Laravel Envoy
Deployer
Yarn
SOAP
Drush
Wordpress CLI
- Apache ZooKeeper (Centralized service for distributed systems to a hierarchical key-value store)
- Kibana (Visualize your Elasticsearch data and navigate the Elastic Stack)
- LogStash (Server-side data processing pipeline that ingests data from a multitude of sources simultaneously)
- Jenkins (automation server, that provides plugins to support building, deploying and automating any project)
- Certbot (Automatically enable HTTPS on your website)
- Swoole (Production-Grade Async programming Framework for PHP)
- SonarQube (continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugs and more)
- Gitlab (A single application for the entire software development lifecycle)
- PostGIS (Database extender for PostgreSQL. It adds support for geographic objects allowing location queries to be run in SQL)
- Blackfire (Empowers all PHP developers and IT/Ops to continuously verify and improve their app’s performance)
- Laravel Echo (Bring the power of WebSockets to your Laravel applications)
- Phalcon (A PHP web framework based on the model–view–controller pattern)
- Minio (Cloud storage server released under Apache License v2, compatible with Amazon S3)
- AWS EB CLI (CLI that helps you deploy and manage your AWS Elastic Beanstalk applications and environments)
- Thumbor (Photo thumbnail service)
- IPython (Provides a rich architecture for interactive computing)
- Jupyter Hub (Jupyter notebook for multiple users)
- Portainer (Build and manage your Docker environments with ease)
- Docker Registry (The Docker Registry implementation for storing and distributing Docker images)
- Docker Web UI (A browser-based solution for browsing and modifying a private Docker registry)
- Workspace (Laradock container that includes a rich set of pre-configured useful tools)
You can choose, which tools to install in your workspace container and other containers, from the .env
file.
If you modify
docker-compose.yml
,.env
or anydockerfile
file, you must re-build your containers, to see those effects in the running instance.
If you can’t find your Software in the list, build it yourself and submit it. Contributions are welcomed :)
Chat with us
Feel free to join us on Gitter.
Laradock exists thanks to all the people who contribute.
Project Maintainers
|
Mahmoud Zalt @mahmoudz |
Bo-Yi Wu @appleboy |
Philippe Trépanier @philtrep |
Mike Erickson @mikeerickson |
Dwi Fahni Denni @zeroc0d3 |
|
Thor Erik @thorerik |
Winfried van Loon @winfried-van-loon |
TJ Miller @sixlive |
Yu-Lung Shao (Allen) @bestlong |
Milan Urukalo @urukalo |
|
Vince Chu @vwchu |
Huadong Zuo @zuohuadong |
Lan Phan @lanphan |
Ahkui @ahkui |
< Join Us > @laradock |
Code Contributors
Financial Contributors
Contribute and help us sustain the project.
Option 1: Donate via Paypal.
Option 2: Become a Sponsor via Github Sponsors.
Option 3: Become a Sponsor/Backer via Open Collective.
Sponsors
Support Laradock with your organization.
Your logo will show up on the github repository index page and the documentation main page.
For more info contact<EMAIL_ADDRESS>Backers
2. Getting Started
2.1 Requirements
2.2 Installation
Choose the setup the best suits your needs.
A) Setup for Single Project
(Follow these steps if you want a separate Docker environment for each project)
A.1) Already have a PHP project:
1 - Clone laradock on your project root directory:
git submodule add https://github.com/Laradock/laradock.git
Note: If you are not using Git yet for your project, you can use git clone
instead of git submodule
.
To keep track of your Laradock changes, between your projects and also keep Laradock updated check these docs
2 - Make sure your folder structure should look like this:
+ project-a
+ laradock-a
+ project-b
+ laradock-b
(It’s important to rename the laradock folders to unique name in each project, if you want to run laradock per project).
3 - Go to the Usage section.

We’ll need to do step 1 of the Usage section now to make this happen.
cp env-example .env
At the top, change the APP_CODE_PATH_HOST
variable to your project path.
APP_CODE_PATH_HOST=../project-z/
Make sure to replace project-z
with your project folder name.
3 - Go to the Usage section.
B) Setup for Multiple Projects:
(Follow these steps if you want a single Docker environment for all your projects)
1 - Clone this repository anywhere on your machine (similar to Steps A.2. from above):
git clone https://github.com/laradock/laradock.git
Your folder structure should look like this:
+ laradock
+ project-1
+ project-2
2 - Go to your web server and create config files to point to different project directory when visiting different domains:
For Nginx go to nginx/sites
, for Apache2 apache2/sites
.
Laradock by default includes some sample files for you to copy app.conf.example
, laravel.conf.example
and symfony.conf.example
.
3 - change the default names *.conf
:
You can rename the config files, project folders and domains as you like, just make sure the root
in the config files, is pointing to the correct project folder name.
4 - Add the domains to the hosts files.
<IP_ADDRESS> project-1.test
<IP_ADDRESS> project-2.test
...
If you use Chrome 63 or above for development, don’t use .dev
. Why?. Instead use .localhost
, .invalid
, .test
, or .example
.
4 - Go to the Usage section.
2.3 Usage
Read Before starting:
If you are using Docker Toolbox (VM), do one of the following:
- Upgrade to Docker Native for Mac/Windows (Recommended). Check out Upgrading Laradock
- Use Laradock v3.*. Visit the Laradock-ToolBox branch. (outdated)
We recommend using a Docker version which is newer than 1.13.
Warning: If you used an older version of Laradock it’s highly recommended to rebuild the containers you need to use see how you rebuild a container in order to prevent as much errors as possible.
1 - Enter the laradock folder and copy env-example
to .env
cp env-example .env
You can edit the .env
file to choose which software’s you want to be installed in your environment. You can always refer to the docker-compose.yml
file to see how those variables are being used.
Depending on the host’s operating system you may need to change the value given to COMPOSE_FILE
. When you are running Laradock on Mac OS the correct file separator to use is :
. When running Laradock from a Windows environment multiple files must be separated with ;
.
By default the containers that will be created have the current directory name as suffix (e.g. laradock_workspace_1
). This can cause mixture of data inside the container volumes if you use laradock in multiple projects. In this case, either read the guide for multiple projects or change the variable COMPOSE_PROJECT_NAME
to something unique like your project name.
2 - Build the environment and run it using docker-compose
In this example we’ll see how to run NGINX (web server) and MySQL (database engine) to host a PHP Web Scripts:
docker-compose up -d nginx mysql
Note: All the web server containers nginx
, apache
..etc depends on php-fpm
, which means if you run any of them, they will automatically launch the php-fpm
container for you, so no need to explicitly specify it in the up
command. If you have to do so, you may need to run them as follows: docker-compose up -d nginx php-fpm mysql
.
You can select your own combination of containers from this list.
(Please note that sometimes we forget to update the docs, so check the docker-compose.yml
file to see an updated list of all available containers).
3 - Enter the Workspace container, to execute commands like (Artisan, Composer, PHPUnit, Gulp, …)
docker-compose exec workspace bash
Alternatively, for Windows PowerShell users: execute the following command to enter any running container:
docker exec -it {workspace-container-id} bash
Note: You can add --user=laradock
to have files created as your host’s user. Example:
docker-compose exec --user=laradock workspace bash
You can change the PUID (User id) and PGID (group id) variables from the .env
file)
4 - Update your project configuration to use the database host
Open your PHP project’s .env
file or whichever configuration file you are reading from, and set the database host DB_HOST
to mysql
:
DB_HOST=mysql
You need to use the Laradock’s default DB credentials which can be found in the .env
file (ex: MYSQL_USER=
).
Or you can change them and rebuild the container.
If you want to install Laravel as PHP project, see How to Install Laravel in a Docker Container.
5 - Open your browser and visit your localhost address.
Make sure you add use the right port number as provided by your running server.
If you followed the multiple projects setup, you can visit http://project-1.test/
and http://project-2.test/
.
3. Documentation
List current running Containers
docker ps
You can also use the following command if you want to see only this project containers:
docker-compose ps
Close all running Containers
docker-compose stop
To stop single container do:
docker-compose stop {container-name}
Delete all existing Containers
docker-compose down
Enter a Container (run commands in a running Container)
1 - First list the current running containers with docker ps
2 - Enter any container using:
docker-compose exec {container-name} bash
Example: enter MySQL container
docker-compose exec mysql bash
Example: enter to MySQL prompt within MySQL container
docker-compose exec mysql mysql -udefault -psecret
3 - To exit a container, type exit
.
Edit default container configuration
Open the docker-compose.yml
and change anything you want.
Examples:
Change MySQL Database Name:
environment:
MYSQL_DATABASE: laradock
...
Change Redis default port to 1111:
ports:
- "1111:6379"
...
Edit a Docker Image
1 - Find the Dockerfile
of the image you want to edit,
example for mysql
it will be mysql/Dockerfile
.
2 - Edit the file the way you want.
3 - Re-build the container:
docker-compose build mysql
More info on Containers rebuilding here.
Build/Re-build Containers
If you do any change to any Dockerfile
make sure you run this command, for the changes to take effect:
docker-compose build
Optionally you can specify which container to rebuild (instead of rebuilding all the containers):
docker-compose build {container-name}
You might use the --no-cache
option if you want full rebuilding (docker-compose build --no-cache {container-name}
).
Add more Software (Docker Images)
To add an image (software), just edit the docker-compose.yml
and add your container details, to do so you need to be familiar with the docker compose file syntax.
View the Log files
The NGINX Log file is stored in the logs/nginx
directory.
However to view the logs of all the other containers (MySQL, PHP-FPM,…) you can run this:
docker-compose logs {container-name}
docker-compose logs -f {container-name}
More options
Install PHP Extensions
Before installing PHP extensions, you have to decide first whether you need FPM
or CLI
, because each of them has it’s own different container, if you need it for both, you have to edit both containers.
The PHP-FPM extensions should be installed in php-fpm/Dockerfile-XX
. (replace XX with your default PHP version number).
The PHP-CLI extensions should be installed in workspace/Dockerfile
.
Change the (PHP-FPM) Version
By default the latest stable PHP versin is configured to run.
The PHP-FPM is responsible of serving your application code, you don’t have to change the PHP-CLI version if you are planning to run your application on different PHP-FPM version.
A) Switch from PHP 7.2
to PHP 5.6
1 - Open the .env
.
2 - Search for PHP_VERSION
.
3 - Set the desired version number:
PHP_VERSION=5.6
4 - Finally rebuild the image
docker-compose build php-fpm
For more details about the PHP base image, visit the official PHP docker images.
Change the PHP-CLI Version
Note: it’s not very essential to edit the PHP-CLI version. The PHP-CLI is only used for the Artisan Commands & Composer. It doesn’t serve your Application code, this is the PHP-FPM job.
The PHP-CLI is installed in the Workspace container. To change the PHP-CLI version you need to simply change the PHP_VERSION
in te .env file as follow:
1 - Open the .env
.
2 - Search for PHP_VERSION
.
3 - Set the desired version number:
PHP_VERSION=7.2
4 - Finally rebuild the image
docker-compose build workspace
Install xDebug
1 - First install xDebug
in the Workspace and the PHP-FPM Containers:
a) open the .env
file
b) search for the WORKSPACE_INSTALL_XDEBUG
argument under the Workspace Container
c) set it to true
d) search for the PHP_FPM_INSTALL_XDEBUG
argument under the PHP-FPM Container
e) set it to true
2 - Re-build the containers docker-compose build workspace php-fpm
For information on how to configure xDebug with your IDE and work it out, check this Repository or follow up on the next section if you use linux and PhpStorm.
Start/Stop xDebug:
By installing xDebug, you are enabling it to run on startup by default.
To control the behavior of xDebug (in the php-fpm
Container), you can run the following commands from the Laradock root folder, (at the same prompt where you run docker-compose):
- Stop xDebug from running by default:
.php-fpm/xdebug stop
. - Start xDebug by default:
.php-fpm/xdebug start
. - See the status:
.php-fpm/xdebug status
.
Note: If .php-fpm/xdebug
doesn’t execute and gives Permission Denied
error the problem can be that file xdebug
doesn’t have execution access. This can be fixed by running chmod
command with desired access permissions.
Install pcov
1 - First install pcov
in the Workspace and the PHP-FPM Containers:
a) open the .env
file
b) search for the WORKSPACE_INSTALL_PCOV
argument under the Workspace Container
c) set it to true
d) search for the PHP_FPM_INSTALL_PCOV
argument under the PHP-FPM Container
e) set it to true
2 - Re-build the containers docker-compose build workspace php-fpm
Note that pcov is only supported on PHP 7.1 or newer. For more information on setting up pcov optimally, check the recommended section of the README
Install phpdbg
Install phpdbg
in the Workspace and the PHP-FPM Containers:
1 - Open the .env
.
2 - Search for WORKSPACE_INSTALL_PHPDBG
.
3 - Set value to true
4 - Do the same for PHP_FPM_INSTALL_PHPDBG
WORKSPACE_INSTALL_PHPDBG=true
PHP_FPM_INSTALL_PHPDBG=true
Install ionCube Loader
1 - First install ionCube Loader
in the Workspace and the PHP-FPM Containers:
a) open the .env
file
b) search for the WORKSPACE_INSTALL_IONCUBE
argument under the Workspace Container
c) set it to true
d) search for the PHP_FPM_INSTALL_IONCUBE
argument under the PHP-FPM Container
e) set it to true
2 - Re-build the containers docker-compose build workspace php-fpm
Always download the latest version of Loaders for ionCube .
Install Deployer (Deployment tool for PHP)
1 - Open the .env
file
2 - Search for the WORKSPACE_INSTALL_DEPLOYER
argument under the Workspace Container
3 - Set it to true
4 - Re-build the containers docker-compose build workspace
Install SonarQube (automatic code review tool)
SonarQube® is an automatic code review tool to detect bugs, vulnerabilities and code smells in your code. It can integrate with your existing workflow to enable continuous code inspection across your project branches and pull requests.
1 - Open the .env
file
2 - Search for the SONARQUBE_HOSTNAME=sonar.example.com
argument
3 - Set it to your-domain sonar.example.com
4 - docker-compose up -d sonarqube
5 - Open your browser: http://localhost:9000/
Troubleshooting:
if you encounter a database error:
docker-compose exec --user=root postgres
source docker-entrypoint-initdb.d/init_sonarqube_db.sh
If you encounter logs error:
docker-compose run --user=root --rm sonarqube chown sonarqube:sonarqube /opt/sonarqube/logs
Prepare Laradock for Production
It’s recommended for production to create a custom docker-compose.yml
file, for example production-docker-compose.yml
In your new production docker-compose.yml
file you should contain only the containers you are planning to run in production (usage example: docker-compose -f production-docker-compose.yml up -d nginx mysql redis ...
).
Note: The Database (MySQL/MariaDB/…) ports should not be forwarded on production, because Docker will automatically publish the port on the host, which is quite insecure, unless specifically told not to. So make sure to remove these lines:
ports:
- "3306:3306"
To learn more about how Docker publishes ports, please read this excellent post on the subject.
Setup Laravel and Docker on Digital Ocean
Full Guide Here
Install Laravel from a Docker Container
1 - First you need to enter the Workspace Container.
2 - Install Laravel.
Example using Composer
composer create-project laravel/laravel my-cool-app "5.2.*"
We recommend using
composer create-project
instead of the Laravel installer, to install Laravel.
For more about the Laravel installation click here.
3 - Edit .env
to Map the new application path:
By default, Laradock assumes the Laravel application is living in the parent directory of the laradock folder.
Since the new Laravel application is in the my-cool-app
folder, we need to replace ../:/var/www
with ../my-cool-app/:/var/www
, as follow:
APP_CODE_PATH_HOST=../my-cool-app/
4 - Go to that folder and start working..
cd my-cool-app
5 - Go back to the Laradock installation steps to see how to edit the .env
file.
Run Artisan Commands
You can run artisan commands and many other Terminal commands from the Workspace container.
1 - Make sure you have the workspace container running.
docker-compose up -d workspace // ..and all your other containers
2 - Find the Workspace container name:
docker-compose ps
3 - Enter the Workspace container:
docker-compose exec workspace bash
Note: Should add --user=laradock
(example docker-compose exec --user=laradock workspace bash
) to have files created as your host’s user to prevent issue owner of log file will be changed to root then laravel website cannot write on log file if using rotated log and new log file not existed
4 - Run anything you want :)
php artisan
composer update
phpunit
vue serve
(browse the results at http://localhost:[WORKSPACE_VUE_CLI_SERVE_HOST_PORT]
)
vue ui
(browse the results at http://localhost:[WORKSPACE_VUE_CLI_UI_HOST_PORT]
)
Run Laravel Queue Worker
1 - Create supervisor configuration file (for ex., named laravel-worker.conf
) for Laravel Queue Worker in php-worker/supervisord.d/
by simply copy from laravel-worker.conf.example
2 - Start everything up
docker-compose up -d php-worker
Run Laravel Scheduler
Laradock provides 2 ways to run Laravel Scheduler
1 - Using cron in workspace container. Most of the time, when you start Laradock, it’ll automatically start workspace container with cron inside, along with setting to run schedule:run
command every minute.
2 - Using Supervisord in php-worker to run schedule:run
. This way is suggested when you don’t want to start workspace in production environment.
a) Comment out cron setting in workspace container, file workspace/crontab/laradock
# * * * * * laradock /usr/bin/php /var/www/artisan schedule:run >> /dev/null 2>&1
b) Create supervisor configuration file (for ex., named laravel-scheduler.conf
) for Laravel Scheduler in php-worker/supervisord.d/
by simply copy from laravel-scheduler.conf.example
c) Start php-worker container
docker-compose up -d php-worker
Use Mailu
1 - You need register a domain.
2 - Required RECAPTCHA for signup email HERE
2 - modify following environment variable in .env
file
MAILU_RECAPTCHA_PUBLIC_KEY=<YOUR_RECAPTCHA_PUBLIC_KEY>
MAILU_RECAPTCHA_PRIVATE_KEY=<YOUR_RECAPTCHA_PRIVATE_KEY>
MAILU_DOMAIN=laradock.io
MAILU_HOSTNAMES=mail.laradock.io
2 - Open your browser and visit http://YOUR_DOMAIN
.
Use NetData
1 - Run the NetData Container (netdata
) with the docker-compose up
command. Example:
docker-compose up -d netdata
2 - Open your browser and visit the localhost on port 19999: http://localhost:19999
Use Metabase
1 - Run the Metabase Container (metbase
) with the docker-compose up
command. Example:
docker-compose up -d metabase
2 - Open your browser and visit the localhost on port 3030: http://localhost:3030
3 - You can use environment to configure Metabase container. See docs in: Running Metabase on Docker
Use Jenkins
1) Boot the container docker-compose up -d jenkins
. To enter the container type docker-compose exec jenkins bash
.
2) Go to http://localhost:8090/
(if you didn’t change your default port mapping)
3) Authenticate from the web app.
- Default username is
admin
. - Default password is
docker-compose exec jenkins cat /var/jenkins_home/secrets/initialAdminPassword
.
(To enter container as root type docker-compose exec --user root jenkins bash
).
4) Install some plugins.
5) Create your first Admin user, or continue as Admin.
Note: to add user go to http://localhost:8090/securityRealm/addUser
and to restart it from the web app visit http://localhost:8090/restart
.
You may wanna change the default security configuration, so go to http://localhost:8090/configureSecurity/
under Authorization and choosing “Anyone can do anything” or “Project-based Matrix Authorization Strategy” or anything else.
Use Redis
1 - First make sure you run the Redis Container (redis
) with the docker-compose up
command.
docker-compose up -d redis
To execute redis commands, enter the redis container first
docker-compose exec redis bash
then enter theredis-cli
.
2 - Open your Laravel’s .env
file and set the REDIS_HOST
to redis
REDIS_HOST=redis
If you’re using Laravel, and you don’t find the REDIS_HOST
variable in your .env
file. Go to the database configuration file config/database.php
and replace the default <IP_ADDRESS>
IP with redis
for Redis like this:
'redis' => [
'cluster' => false,
'default' => [
'host' => 'redis',
'port' => 6379,
'database' => 0,
],
],
3 - To enable Redis Caching and/or for Sessions Management. Also from the .env
file set CACHE_DRIVER
and SESSION_DRIVER
to redis
instead of the default file
.
CACHE_DRIVER=redis
SESSION_DRIVER=redis
4 - Finally make sure you have the predis/predis
package (~1.0)
installed via Composer:
composer require predis/predis:^1.0
5 - You can manually test it from Laravel with this code:
\Cache::store('redis')->put('Laradock', 'Awesome', 10);
Use Redis Cluster
1 - First make sure you run the Redis-Cluster Container (redis-cluster
) with the docker-compose up
command.
docker-compose up -d redis-cluster
2 - Open your Laravel’s config/database.php
and set the redis cluster configuration. Below is example configuration with phpredis.
Read the Laravel official documentation for more details.
'redis' => [
'client' => 'phpredis',
'options' => [
'cluster' => 'redis',
],
'clusters' => [
'default' => [
[
'host' => 'redis-cluster',
'password' => null,
'port' => 7000,
'database' => 0,
],
],
],
],
Use Varnish
The goal was to proxy request to varnish server using nginx. So only nginx has been configured for Varnish proxy.
Nginx is on port 80 or 443. Nginx sends request through varnish server and varnish server sends request back to nginx on port 81 (external port is defined in VARNISH_BACKEND_PORT
).
The idea was taken from this post
The Varnish configuration was developed and tested for Wordpress only. Probably it works with other systems.
Steps to configure varnish proxy server:
- You have to set domain name for VARNISH_PROXY1_BACKEND_HOST variable.
- If you want to use varnish for different domains, you have to add new configuration section in your env file.
VARNISH_PROXY1_CACHE_SIZE=128m VARNISH_PROXY1_BACKEND_HOST=replace_with_your_domain.name VARNISH_PROXY1_SERVER=SERVER1
- Then you have to add new config section into docker-compose.yml with related variables:
custom_proxy_name: container_name: custom_proxy_name build: ./varnish expose: - ${VARNISH_PORT} environment: - VARNISH_CONFIG=${VARNISH_CONFIG} - CACHE_SIZE=${VARNISH_PROXY2_CACHE_SIZE} - VARNISHD_PARAMS=${VARNISHD_PARAMS} - VARNISH_PORT=${VARNISH_PORT} - BACKEND_HOST=${VARNISH_PROXY2_BACKEND_HOST} - BACKEND_PORT=${VARNISH_BACKEND_PORT} - VARNISH_SERVER=${VARNISH_PROXY2_SERVER} ports: - "${VARNISH_PORT}:${VARNISH_PORT}" links: - workspace networks: - frontend
- change your varnish config and add nginx configuration. Example Nginx configuration is here:
nginx/sites/laravel_varnish.conf.example
. varnish/default.vcl
is old varnish configuration, which was used in the previous version. Usedefault_wordpress.vcl
instead.
How to run:
- Rename
default_wordpress.vcl
todefault.vcl
docker-compose up -d nginx
docker-compose up -d proxy
Keep in mind that varnish server must be built after Nginx cause varnish checks domain affordability.
FAQ:
- How to purge cache?
run from any cli:curl -X PURGE https://yourwebsite.com/
. - How to reload varnish?
docker container exec proxy varnishreload
- Which varnish commands are allowed?
- varnishadm
- varnishd
- varnishhist
- varnishlog
- varnishncsa
- varnishreload
- varnishstat
- varnishtest
- varnishtop
- varnishadm
- How to reload Nginx?
docker exec Nginx nginx -t
docker exec Nginx nginx -s reload
Use Mongo
1 - First install mongo
in the Workspace and the PHP-FPM Containers:
a) open the .env
file
b) search for the WORKSPACE_INSTALL_MONGO
argument under the Workspace Container
c) set it to true
d) search for the PHP_FPM_INSTALL_MONGO
argument under the PHP-FPM Container
e) set it to true
2 - Re-build the containers docker-compose build workspace php-fpm
3 - Run the MongoDB Container (mongo
) with the docker-compose up
command.
docker-compose up -d mongo
4 - Add the MongoDB configurations to the config/database.php
configuration file:
'connections' => [
'mongodb' => [
'driver' => 'mongodb',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', 27017),
'database' => env('DB_DATABASE', 'database'),
'username' => '',
'password' => '',
'options' => [
'database' => '',
]
],
// ...
],
5 - Open your Laravel’s .env
file and update the following variables:
- set the
DB_HOST
to yourmongo
. - set the
DB_PORT
to27017
. - set the
DB_DATABASE
todatabase
.
6 - Finally make sure you have the jenssegers/mongodb
package installed via Composer and its Service Provider is added.
composer require jenssegers/mongodb
More details about this here.
7 - Test it:
- First let your Models extend from the Mongo Eloquent Model. Check the documentation.
- Enter the Workspace Container.
- Migrate the Database
php artisan migrate
.
Use PhpMyAdmin
1 - Run the phpMyAdmin Container (phpmyadmin
) with the docker-compose up
command. Example:
# use with mysql
docker-compose up -d mysql phpmyadmin
# use with mariadb
docker-compose up -d mariadb phpmyadmin
Note: To use with MariaDB, open .env
and set PMA_DB_ENGINE=mysql
to PMA_DB_ENGINE=mariadb
.
2 - Open your browser and visit the localhost on port 8080: http://localhost:8080
Use Gitlab
1 - Run the Gitlab Container (gitlab
) with the docker-compose up
command. Example:
docker-compose up -d gitlab
2 - Open your browser and visit the localhost on port 8989: http://localhost:8989
Note: You may change GITLAB_DOMAIN_NAME to your own domain name like http://gitlab.example.com
default is http://localhost
Use Gitlab Runner
1 - Retrieve the registration token in your gitlab project (Settings > CI / CD > Runners > Set up a specific Runner manually)
2 - Open the .env
file and set the following changes:
# so that gitlab container will pass the correct domain to gitlab-runner container
GITLAB_DOMAIN_NAME=http://gitlab
GITLAB_RUNNER_REGISTRATION_TOKEN=<value-in-step-1>
# so that gitlab-runner container will send POST request for registration to correct domain
GITLAB_CI_SERVER_URL=http://gitlab
3 - Open the docker-compose.yml
file and add the following changes:
gitlab-runner:
environment: # these values will be used during `gitlab-runner register`
- RUNNER_EXECUTOR=docker # change from shell (default)
- DOCKER_IMAGE=alpine
- DOCKER_NETWORK_MODE=laradock_backend
networks:
- backend # connect to network where gitlab service is connected
4 - Run the Gitlab-Runner Container (gitlab-runner
) with the docker-compose up
command. Example:
docker-compose up -d gitlab-runner
5 - Register the gitlab-runner to the gitlab container
docker-compose exec gitlab-runner bash
gitlab-runner register
6 - Create a .gitlab-ci.yml
file for your pipeline
before_script:
- echo Hello!
job1:
scripts:
- echo job1
7 - Push changes to gitlab
8 - Verify that pipeline is run successful
Use Adminer
1 - Run the Adminer Container (adminer
) with the docker-compose up
command. Example:
docker-compose up -d adminer
2 - Open your browser and visit the localhost on port 8080: http://localhost:8080
Note: We’ve locked Adminer to version 4.3.0 as at the time of writing it contained a major bug preventing PostgreSQL users from logging in. If that bug is fixed (or if you’re not using PostgreSQL) feel free to set Adminer to the latest version within the Dockerfile: FROM adminer:latest
Use Portainer
1 - Run the Portainer Container (portainer
) with the docker-compose up
command. Example:
docker-compose up -d portainer
2 - Open your browser and visit the localhost on port 9010: http://localhost:9010
Use PgAdmin
1 - Run the pgAdmin Container (pgadmin
) with the docker-compose up
command. Example:
docker-compose up -d postgres pgadmin
2 - Open your browser and visit the localhost on port 5050: http://localhost:5050
3 - At login page use default credentials:
Username<EMAIL_ADDRESS>Password : admin
Use Beanstalkd
1 - Run the Beanstalkd Container:
docker-compose up -d beanstalkd
2 - Configure Laravel to connect to that container by editing the config/queue.php
config file.
a. first set beanstalkd
as default queue driver
b. set the queue host to beanstalkd : QUEUE_HOST=beanstalkd
beanstalkd is now available on default port 11300
.
3 - Require the dependency package pda/pheanstalk using composer.
Optionally you can use the Beanstalkd Console Container to manage your Queues from a web interface.
1 - Run the Beanstalkd Console Container:
docker-compose up -d beanstalkd-console
2 - Open your browser and visit http://localhost:2080/
Note: You can customize the port on which beanstalkd console is listening by changing BEANSTALKD_CONSOLE_HOST_PORT
in .env
. The default value is 2080.
3 - Add the server
- Host: beanstalkd
- Port: 11300
4 - Done.
Use Confluence
1 - Run the Confluence Container (confluence
) with the docker-compose up
command. Example:
docker-compose up -d confluence
2 - Open your browser and visit the localhost on port 8090: http://localhost:8090
Note: Confluence is a licensed application - an evaluation licence can be obtained from Atlassian.
You can set custom confluence version in CONFLUENCE_VERSION
. Find more info in section ‘Versioning’
Confluence usage with Nginx and SSL.
Find an instance configuration file in
nginx/sites/confluence.conf.example
and replace sample domain with yours.Configure ssl keys to your domain.
Keep in mind that Confluence is still accessible on 8090 anyway.
Use ElasticSearch
1 - Run the ElasticSearch Container (elasticsearch
) with the docker-compose up
command:
docker-compose up -d elasticsearch
2 - Open your browser and visit the localhost on port 9200: http://localhost:9200
The default username is
elastic
and the default password ischangeme
.
Install ElasticSearch Plugin
1 - Install an ElasticSearch plugin.
docker-compose exec elasticsearch /usr/share/elasticsearch/bin/plugin install {plugin-name}
2 - Restart elasticsearch container
docker-compose restart elasticsearch
Use Selenium
1 - Run the Selenium Container (selenium
) with the docker-compose up
command. Example:
docker-compose up -d selenium
2 - Open your browser and visit the localhost on port 4444 at the following URL: http://localhost:4444/wd/hub
Use RethinkDB
The RethinkDB is an open-source Database for Real-time Web (RethinkDB). A package (Laravel RethinkDB) is being developed and was released a version for Laravel 5.2 (experimental).
1 - Run the RethinkDB Container (rethinkdb
) with the docker-compose up
command.
docker-compose up -d rethinkdb
2 - Access the RethinkDB Administration Console http://localhost:8090/#tables for create a database called database
.
3 - Add the RethinkDB configurations to the config/database.php
configuration file:
'connections' => [
'rethinkdb' => [
'name' => 'rethinkdb',
'driver' => 'rethinkdb',
'host' => env('DB_HOST', 'rethinkdb'),
'port' => env('DB_PORT', 28015),
'database' => env('DB_DATABASE', 'test'),
]
// ...
],
4 - Open your Laravel’s .env
file and update the following variables:
- set the
DB_CONNECTION
to yourrethinkdb
. - set the
DB_HOST
torethinkdb
. - set the
DB_PORT
to28015
. - set the
DB_DATABASE
todatabase
.
Additional Notes
- You may do backing up of your data using the next reference: backing up your data.
Use Minio
1 - Configure Minio:
- On the workspace container, change INSTALL_MC
to true to get the client
- Set MINIO_ACCESS_KEY
and MINIO_ACCESS_SECRET
if you wish to set proper keys
2 - Run the Minio Container (minio
) with the docker-compose up
command. Example:
docker-compose up -d minio
3 - Open your browser and visit the localhost on port 9000 at the following URL: http://localhost:9000
4 - Create a bucket either through the webui or using the mc client:
mc mb minio/bucket
5 - When configuring your other clients use the following details:
S3_HOST=http://minio
S3_KEY=access
S3_SECRET=secretkey
S3_REGION=us-east-1
S3_BUCKET=bucket
Use Thumbor
Thumbor is a smart imaging service. It enables on-demand crop, resizing and flipping of images. (Thumbor)
1 - Configure Thumbor: - Checkout all the options under the thumbor settings
2 - Run the Thumbor Container (minio
) with the docker-compose up
command. Example:
docker-compose up -d thumbor
3 - Navigate to an example image on http://localhost:8000/unsafe/300x300/i.imgur.com/bvjzPct.jpg
For more documentation on Thumbor visit the Thumbor documenation page
Use AWS
1 - Configure AWS: - make sure to add your SSH keys in aws/ssh_keys folder
2 - Run the Aws Container (aws
) with the docker-compose up
command. Example:
docker-compose up -d aws
3 - Access the aws container with docker-compose exec aws bash
4 - To start using eb cli inside the container, initialize your project first by doing ‘eb init’. Read the aws eb cli docs for more details.
Use Grafana
1 - Configure Grafana: Change Port using GRAFANA_PORT
if you wish to. Default is port 3000.
2 - Run the Grafana Container (grafana
) with the docker-compose up
command:
docker-compose up -d grafana
3 - Open your browser and visit the localhost on port 3000 at the following URL: http://localhost:3000
4 - Login using the credentials User = admin
, Password = admin
. Change the password in the web interface if you want to.
Use Graylog
1 - Boot the container docker-compose up -d graylog
2 - Open your Laravel’s .env
file and set the GRAYLOG_PASSWORD
to some passsword, and GRAYLOG_SHA256_PASSWORD
to the sha256 representation of your password (GRAYLOG_SHA256_PASSWORD
is what matters, GRAYLOG_PASSWORD
is just a reminder of your password).
Your password must be at least 16 characters long You can generate sha256 of some password with the following command
echo -n somesupersecretpassword | sha256sum
GRAYLOG_PASSWORD=somesupersecretpassword
GRAYLOG_SHA256_PASSWORD=b1cb6e31e172577918c9e7806c572b5ed8477d3f57aa737bee4b5b1db3696f09
3 - Go to http://localhost:9000/
(if your port is not changed)
4 - Authenticate from the app.
Username: admin Password: somesupersecretpassword (if you haven’t changed the password)
5 - Go to the system->inputs and launch new input
Use Traefik
To use Traefik you need to do some changes in traefik/trafik.toml
and docker-compose.yml
.
1 - Open traefik.toml
and change the e-mail
property in acme
section.
2 - Change your domain in acme.domains
. For example: main = "example.org"
2.1 - If you have subdomains, you must add them to sans
property in acme.domains
section.
[[acme.domais]]
main = "example.org"
sans = ["monitor.example.org", "pma.example.org"]
3 - If you need to add basic authentication (https://docs.traefik.io/configuration/entrypoints/#basic-authentication), you just need to add the following text after [entryPoints.https.tls]
:
[entryPoints.https.auth.basic]
users = ["user:password"]
4 - You need to change the docker-compose.yml
file to match the Traefik needs. If you want to use Traefik, you must not expose the ports of each container to the internet, but specify some labels.
4.1 For example, let’s try with NGINX. You must have:
nginx:
build:
context: ./nginx
args:
- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
- CHANGE_SOURCE=${CHANGE_SOURCE}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx
- ${NGINX_SITES_PATH}:/etc/nginx/sites-available
depends_on:
- php-fpm
networks:
- frontend
- backend
labels:
- traefik.backend=nginx
- traefik.frontend.rule=Host:example.org
- traefik.port=80
instead of
nginx:
build:
context: ./nginx
args:
- PHP_UPSTREAM_CONTAINER=${NGINX_PHP_UPSTREAM_CONTAINER}
- PHP_UPSTREAM_PORT=${NGINX_PHP_UPSTREAM_PORT}
- CHANGE_SOURCE=${CHANGE_SOURCE}
volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
- ${NGINX_HOST_LOG_PATH}:/var/log/nginx
- ${NGINX_SITES_PATH}:/etc/nginx/sites-available
- ${NGINX_SSL_PATH}:/etc/nginx/ssl
ports:
- "${NGINX_HOST_HTTP_PORT}:80"
- "${NGINX_HOST_HTTPS_PORT}:443"
depends_on:
- php-fpm
networks:
- frontend
- backend
Use Mosquitto (MQTT Broker)
1 - Configure Mosquitto: Change Port using MOSQUITTO_PORT
if you wish to. Default is port 9001.
2 - Run the Mosquitto Container (mosquitto
) with the docker-compose up
command:
docker-compose up -d mosquitto
3 - Open your command line and use a MQTT Client (Eg. https://github.com/mqttjs/MQTT.js) to subscribe a topic and publish a message.
4 - Subscribe: mqtt sub -t 'test' -h localhost -p 9001 -C 'ws' -v
5 - Publish: mqtt pub -t 'test' -h localhost -p 9001 -C 'ws' -m 'Hello!'
Install CodeIgniter
To install CodeIgniter 3 on Laradock all you have to do is the following simple steps:
1 - Open the docker-compose.yml
file.
2 - Change CODEIGNITER=false
to CODEIGNITER=true
.
3 - Re-build your PHP-FPM Container docker-compose build php-fpm
.
Install Powerline
1 - Open the .env
file and set WORKSPACE_INSTALL_POWERLINE
and WORKSPACE_INSTALL_PYTHON
to true
.
2 - Run docker-compose build workspace
, after the step above.
Powerline is required python
Install Symfony
1 - Open the .env
file and set WORKSPACE_INSTALL_SYMFONY
to true
.
2 - Run docker-compose build workspace
, after the step above.
3 - The NGINX sites include a default config file for your Symfony project symfony.conf.example
, so edit it and make sure the root
is pointing to your project web
directory.
4 - Run docker-compose restart
if the container was already running, before the step above.
5 - Visit symfony.test
Miscellaneous
Change the timezone
To change the timezone for the workspace
container, modify the TZ
build argument in the Docker Compose file to one in the TZ database.
For example, if I want the timezone to be New York
:
workspace:
build:
context: ./workspace
args:
- TZ=America/New_York
...
We also recommend setting the timezone in Laravel.
Add locales to PHP-FPM
To add locales to the container:
1 - Open the .env
file and set PHP_FPM_INSTALL_ADDITIONAL_LOCALES
to true
.
2 - Add locale codes to PHP_FPM_ADDITIONAL_LOCALES
.
3 - Re-build your PHP-FPM Container docker-compose build php-fpm
.
4 - Check enabled locales with docker-compose exec php-fpm locale -a
Update the locale setting, default is POSIX
1 - Open the .env
file and set PHP_FPM_DEFAULT_LOCALE
to en_US.UTF8
or other locale you want.
2 - Re-build your PHP-FPM Container docker-compose build php-fpm
.
3 - Check the default locale with docker-compose exec php-fpm locale
Adding cron jobs
You can add your cron jobs to workspace/crontab/root
after the php artisan
line.
* * * * * laradock /usr/bin/php /var/www/artisan schedule:run >> /dev/null 2>&1
# Custom cron
* * * * * root echo "Every Minute" > /var/log/cron.log 2>&1
Make sure you change the timezone if you don’t want to use the default (UTC).
If you are on Windows, verify that the line endings for this file are LF only, otherwise the cron jobs will silently fail.
Access workspace via ssh
You can access the workspace
container through localhost:2222
by setting the INSTALL_WORKSPACE_SSH
build argument to true
.
To change the default forwarded port for ssh:
workspace:
ports:
- "2222:22" # Edit this line
...
Then login using:
ssh -o PasswordAuthentication=no \
-o StrictHostKeyChecking=no \
-o UserKnownHostsFile=/dev/null \
-p 2222 \
-i workspace/insecure_id_rsa \
laradock@localhost
To login as root, replace laradock@localhost with root@localhost.
Change the (MySQL) Version
By default MySQL 8.0 is running.
MySQL 8.0 is a development release. You may prefer to use the latest stable version, or an even older release. If you wish, you can change the MySQL image that is used.
Open up your .env file and set the MYSQL_VERSION
variable to the version you would like to install.
MYSQL_VERSION=5.7
Available versions are: 5.5, 5.6, 5.7, 8.0, or latest. See https://store.docker.com/images/mysql for more information.
MySQL root access
The default username and password for the root MySQL user are root
and root
.
1 - Enter the MySQL container: docker-compose exec mysql bash
.
2 - Enter mysql: mysql -uroot -proot
for non root access use mysql -udefault -psecret
.
3 - See all users: SELECT User FROM mysql.user;
4 - Run any commands show databases
, show tables
, select * from.....
.
Create Multiple Databases (MySQL)
Create createdb.sql
from mysql/docker-entrypoint-initdb.d/createdb.sql.example
in mysql/docker-entrypoint-initdb.d/*
and add your SQL syntax as follow:
CREATE DATABASE IF NOT EXISTS `your_db_1` COLLATE 'utf8_general_ci' ;
GRANT ALL ON `your_db_1`.* TO 'mysql_user'@'%' ;
Change MySQL port
Modify the mysql/my.cnf
file to set your port number, 1234
is used as an example.
[mysqld]
port=1234
If you need MySQL access from your host, do not forget to change the internal port number ("3306:3306"
-> "3306:1234"
) in the docker-compose configuration file.
Use custom Domain (instead of the Docker IP)
Assuming your custom domain is laravel.test
1 - Open your /etc/hosts
file and map your localhost address <IP_ADDRESS>
to the laravel.test
domain, by adding the following:
<IP_ADDRESS> laravel.test
2 - Open your browser and visit {http://laravel.test}
Optionally you can define the server name in the NGINX configuration file, like this:
server_name laravel.test;
Enable Global Composer Build Install
Enabling Global Composer Install during the build for the container allows you to get your composer requirements installed and available in the container after the build is done.
1 - Open the .env
file
2 - Search for the WORKSPACE_COMPOSER_GLOBAL_INSTALL
argument under the Workspace Container and set it to true
3 - Now add your dependencies to workspace/composer.json
4 - Re-build the Workspace Container docker-compose build workspace
Add authentication credential for Magento 2
1 - Open the .env
file
2 - Search for the WORKSPACE_COMPOSER_AUTH
argument under the Workspace Container and set it to true
3 - Now add your credentials to workspace/auth.json
4 - Re-build the Workspace Container docker-compose build workspace
Install Prestissimo
Prestissimo is a plugin for composer which enables parallel install functionality.
1 - Enable Running Global Composer Install during the Build:
Click on this Enable Global Composer Build Install and do steps 1 and 2 only then continue here.
2 - Add prestissimo as requirement in Composer:
a - Now open the workspace/composer.json
file
b - Add "hirak/prestissimo": "^0.3"
as requirement
c - Re-build the Workspace Container docker-compose build workspace
Install Node + NVM
To install NVM and NodeJS in the Workspace container
1 - Open the .env
file
2 - Search for the WORKSPACE_INSTALL_NODE
argument under the Workspace Container and set it to true
3 - Re-build the container docker-compose build workspace
Install Node + YARN
Yarn is a new package manager for JavaScript. It is so faster than npm, which you can find here.To install NodeJS and Yarn in the Workspace container:
1 - Open the .env
file
2 - Search for the WORKSPACE_INSTALL_NODE
and WORKSPACE_INSTALL_YARN
argument under the Workspace Container and set it to true
3 - Re-build the container docker-compose build workspace
Install NPM GULP toolkit
To install NPM GULP toolkit in the Workspace container
1 - Open the .env
file
2 - Search for the WORKSPACE_INSTALL_NPM_GULP
argument under the Workspace Container and set it to true
3 - Re-build the container docker-compose build workspace
Install NPM BOWER package manager
To install NPM BOWER package manager in the Workspace container
1 - Open the .env
file
2 - Search for the WORKSPACE_INSTALL_NPM_BOWER
argument under the Workspace Container and set it to true
3 - Re-build the container docker-compose build workspace
Install NPM VUE CLI
To install NPM VUE CLI in the Workspace container
1 - Open the .env
file
2 - Search for the WORKSPACE_INSTALL_NPM_VUE_CLI
argument under the Workspace Container and set it to true
3 - Change vue serve
port using WORKSPACE_VUE_CLI_SERVE_HOST_PORT
if you wish to (default value is 8080)
4 - Change vue ui
port using WORKSPACE_VUE_CLI_UI_HOST_PORT
if you wish to (default value is 8001)
5 - Re-build the container docker-compose build workspace
Install NPM ANGULAR CLI
To install NPM ANGULAR CLI in the Workspace container
1 - Open the .env
file
2 - Search for the WORKSPACE_INSTALL_NPM_ANGULAR_CLI
argument under the Workspace Container and set it to true
3 - Re-build the container docker-compose build workspace
Install Linuxbrew
Linuxbrew is a package manager for Linux. It is the Linux version of MacOS Homebrew and can be found here. To install Linuxbrew in the Workspace container:
1 - Open the .env
file
2 - Search for the WORKSPACE_INSTALL_LINUXBREW
argument under the Workspace Container and set it to true
3 - Re-build the container docker-compose build workspace
Install FFMPEG
To install FFMPEG in the Workspace container
1 - Open the .env
file
2 - Search for the WORKSPACE_INSTALL_FFMPEG
argument under the Workspace Container and set it to true
3 - Re-build the container docker-compose build workspace
4 - If you use the php-worker
container too, please follow the same steps above especially if you have conversions that have been queued.
PS Don’t forget to install the binary in the php-fpm
container too by applying the same steps above to its container, otherwise the you’ll get an error when running the php-ffmpeg
binary.
Install wkhtmltopdf
wkhtmltopdf is a utility for outputting a PDF from HTML
To install wkhtmltopdf in the Workspace container
1 - Open the .env
file
2 - Search for the WORKSPACE_INSTALL_WKHTMLTOPDF
argument under the Workspace Container and set it to true
3 - Re-build the container docker-compose build workspace
PS Don’t forget to install the binary in the php-fpm
container too by applying the same steps above to its container, otherwise the you’ll get an error when running the wkhtmltopdf
binary.
Install GNU Parallel
GNU Parallel is a command line tool to run multiple processes in parallel.
(see https://www.gnu.org/software/parallel/parallel_tutorial.html)
To install GNU Parallel in the Workspace container
1 - Open the .env
file
2 - Search for the WORKSPACE_INSTALL_GNU_PARALLEL
argument under the Workspace Container and set it to true
3 - Re-build the container docker-compose build workspace
Install Supervisor
Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems.
(see http://supervisord.org/index.html)
To install Supervisor in the Workspace container
1 - Open the .env
file
2 - Set WORKSPACE_INSTALL_SUPERVISOR
and WORKSPACE_INSTALL_PYTHON
to true
.
3 - Create supervisor configuration file (for ex., named laravel-worker.conf
) for Laravel Queue Worker in php-worker/supervisord.d/
by simply copy from laravel-worker.conf.example
4 - Re-build the container docker-compose build workspace
Or docker-composer up --build -d workspace
Common Terminal Aliases
When you start your docker container, Laradock will copy the aliases.sh
file located in the laradock/workspace
directory and add sourcing to the container ~/.bashrc
file.
You are free to modify the aliases.sh
as you see fit, adding your own aliases (or function macros) to suit your requirements.
Install Aerospike extension
1 - First install aerospike
in the Workspace and the PHP-FPM Containers:
a) open the .env
file
b) search for the WORKSPACE_INSTALL_AEROSPIKE
argument under the Workspace Container
c) set it to true
d) search for the PHP_FPM_INSTALL_AEROSPIKE
argument under the PHP-FPM Container
e) set it to true
2 - Re-build the containers docker-compose build workspace php-fpm
Install Laravel Envoy (Envoy Task Runner)
1 - Open the .env
file
2 - Search for the WORKSPACE_INSTALL_LARAVEL_ENVOY
argument under the Workspace Container
3 - Set it to true
4 - Re-build the containers docker-compose build workspace
Laravel Envoy Documentation Here
Install php calendar extension
1 - Open the .env
file
2 - Search for the PHP_FPM_INSTALL_CALENDAR
argument under the PHP-FPM container
3 - Set it to true
4 - Re-build the containers docker-compose build php-fpm
Install libfaketime in the php-fpm container
Libfaketime allows you to control the date and time that is returned from the operating system.
It can be used by specifying a special string in the PHP_FPM_FAKETIME
variable in the .env
file.
For example:
PHP_FPM_FAKETIME=-1d
will set the clock back 1 day. See (https://github.com/wolfcw/libfaketime) for more information.
1 - Open the .env
file
2 - Search for the PHP_FPM_INSTALL_FAKETIME
argument under the PHP-FPM container
3 - Set it to true
4 - Search for the PHP_FPM_FAKETIME
argument under the PHP-FPM container
5 - Set it to the desired string
6 - Re-build the containers docker-compose build php-fpm
Install YAML PHP extension in the php-fpm container
YAML PHP extension allows you to easily parse and create YAML structured data. I like YAML because it’s well readable for humans. See http://php.net/manual/en/ref.yaml.php and http://yaml.org/ for more info.
1 - Open the .env
file
2 - Search for the PHP_FPM_INSTALL_YAML
argument under the PHP-FPM container
3 - Set it to true
4 - Re-build the container docker-compose build php-fpm
Install AST PHP extension
AST exposes the abstract syntax tree generated by PHP 7+. This extension is required by tools such as Phan
, a static analyzer for PHP.
1 - Open the .env
file
2 - Search for the WORKSPACE_INSTALL_AST
argument under the Workspace Container
3 - Set it to true
4 - Re-build the container docker-compose build workspace
Note If you need a specific version of AST then search for the WORKSPACE_AST_VERSION
argument under the Workspace Container and set it to the desired version and continue step 4.
Install Git Bash Prompt
A bash prompt that displays information about the current git repository. In particular the branch name, difference with remote branch, number of files staged, changed, etc.
1 - Open the .env
file
2 - Search for the WORKSPACE_INSTALL_GIT_PROMPT
argument under the Workspace Container
3 - Set it to true
4 - Re-build the container docker-compose build workspace
Note You can configure bash-git-prompt by editing the workspace/gitprompt.sh
file and re-building the workspace container.
For configuration information, visit the bash-git-prompt repository.
PHPStorm Debugging Guide
Remote debug Laravel web and phpunit tests.
Setup Google Cloud for docker registry
gcloud auth configure-docker
Login to gcloud for use the registry and auth the permission.
gcloud auth login
Keep track of your Laradock changes
- Fork the Laradock repository.
- Use that fork as a submodule.
- Commit all your changes to your fork.
- Pull new stuff from the main repository from time to time.
Improve speed on MacOS
Docker on the Mac is slow, at the time of writing. Especially for larger projects, this can be a problem. The problem is older than March 2016 - as it’s a such a long-running issue, we’re including it in the docs here.
So since sharing code into Docker containers with osxfs have very poor performance compared to Linux. Likely there are some workarounds:
Workaround A: using dinghy
Dinghy creates its own VM using docker-machine, it will not modify your existing docker-machine VMs.
Quick Setup giude, (we recommend you check their docs)
1) brew tap codekitchen/dinghy
2) brew install dinghy
3) dinghy create --provider virtualbox
(must have virtualbox installed, but they support other providers if you prefer)
4) after the above command is done it will display some env variables, copy them to the bash profile or zsh or.. (this will instruct docker to use the server running inside the VM)
5) docker-compose up ...
Workaround B: using d4m-nfs
You can use the d4m-nfs solution in 2 ways, the first is by using the built-in Laradock integration, and the second is using the tool separately. Below is show case of both methods:
B.1: using the built in d4m-nfs integration
In simple terms, docker-sync creates a docker container with a copy of all the application files that can be accessed very quickly from the other containers. On the other hand, docker-sync runs a process on the host machine that continuously tracks and updates files changes from the host to this intermediate container.
Out of the box, it comes pre-configured for OS X, but using it on Windows is very easy to set-up by modifying the DOCKER_SYNC_STRATEGY
on the .env
Usage
Laradock comes with sync.sh
, an optional bash script, that automates installing, running and stopping docker-sync. Note that to run the bash script you may need to change the permissions chmod 755 sync.sh
1) Configure your Laradock environment as you would normally do and test your application to make sure that your sites are running correctly.
2) Make sure to set DOCKER_SYNC_STRATEGY
on the .env
. Read the syncing strategies for details.
# osx: 'native_osx' (default)
# windows: 'unison'
# linux: docker-sync not required
DOCKER_SYNC_STRATEGY=native_osx
3) set APP_CODE_CONTAINER_FLAG
to APP_CODE_CONTAINER_FLAG=:nocopy
in the .env file
4) Install the docker-sync gem on the host-machine:
./sync.sh install
5) Start docker-sync and the Laradock environment.
Specify the services you want to run, as you would normally do with docker-compose up
./sync.sh up nginx mysql
Please note that the first time docker-sync runs, it will copy all the files to the intermediate container and that may take a very long time (15min+). 6) To stop the environment and docker-sync do:
./sync.sh down
Setting up Aliases (optional)
You may create bash profile aliases to avoid having to remember and type these commands for everyday development.
Add the following lines to your ~/.bash_profile
:
alias devup="cd /PATH_TO_LARADOCK/laradock; ./sync.sh up nginx mysql" #add your services
alias devbash="cd /PATH_TO_LARADOCK/laradock; ./sync.sh bash"
alias devdown="cd /PATH_TO_LARADOCK/laradock; ./sync.sh down"
Now from any location on your machine, you can simply run devup
, devbash
and devdown
.
Additional Commands
Opening bash on the workspace container (to run artisan for example):
./sync.sh bash
Manually triggering the synchronization of the files:
./sync.sh sync
Removing and cleaning up the files and the docker-sync container. Use only if you want to rebuild or remove docker-sync completely. The files on the host will be kept untouched.
./sync.sh clean
Additional Notes
- You may run laradock with or without docker-sync at any time using with the same
.env
anddocker-compose.yml
, because the configuration is overridden automatically when docker-sync is used. - You may inspect the
sync.sh
script to learn each of the commands and even add custom ones. - If a container cannot access the files on docker-sync, you may need to set a user on the Dockerfile of that container with an id of 1000 (this is the UID that nginx and php-fpm have configured on laradock). Alternatively, you may change the permissions to 777, but this is not recommended.
Visit the docker-sync documentation for more details.
B.2: using the d4m-nfs tool
D4m-nfs automatically mount NFS volume instead of osxfs one.
1) Update the Docker [File Sharing] preferences:
Click on the Docker Icon > Preferences > (remove everything form the list except /tmp
).
2) Restart Docker.
3) Clone the d4m-nfs repository to your home
directory.
git clone https://github.com/IFSight/d4m-nfs ~/d4m-nfs
4) Create (or edit) the file ~/d4m-nfs/etc/d4m-nfs-mounts.txt
, and write the following configuration in it:
/Users:/Users
5) Create (or edit) the file /etc/exports
, make sure it exists and is empty. (There may be collisions if you come from Vagrant or if you already executed the d4m-nfs.sh
script before).
6) Run the d4m-nfs.sh
script (might need Sudo):
~/d4m-nfs/d4m-nfs.sh
That’s it! Run your containers.. Example:
docker-compose up ...
Note: If you faced any errors, try restarting Docker, and make sure you have no spaces in the d4m-nfs-mounts.txt
file, and your /etc/exports
file is clear.
Upgrade Laradock
Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requires upgrading Laradock from v3.* to v4.*:
- Stop the docker VM
docker-machine stop {default}
- Install Docker for Mac or Windows.
- Upgrade Laradock to
v4.*.*
(git pull origin master
) - Use Laradock as you used to do:
docker-compose up -d nginx mysql
.
Note: If you face any problem with the last step above: rebuild all your containers
docker-compose build --no-cache
“Warning Containers Data might be lost!”
5. Help & Questions
Join the chat room on Gitter and get help and support from the community.
You can as well can open an issue on Github (will be labeled as Question) and discuss it with people on Gitter.
Common Problems
Here’s a list of the common problems you might face, and the possible solutions.
I see a blank (white) page instead of the Laravel ‘Welcome’ page!
Run the following command from the Laravel root directory:
sudo chmod -R 777 storage bootstrap/cache
I see “Welcome to nginx” instead of the Laravel App!
Use http://<IP_ADDRESS>
instead of http://localhost
in your browser.
I see an error message containing (address already in use) or (port is already allocated)
Make sure the ports for the services that you are trying to run (22, 80, 443, 3306, etc.) are not being used already by other programs on the host, such as a built in apache
/httpd
service or other development tools you have installed.
I get NGINX error 404 Not Found on Windows.
- Go to docker Settings on your Windows machine.
- Click on the
Shared Drives
tab and check the drive that contains your project files. - Enter your windows username and password.
- Go to the
reset
tab and click restart docker.
The time in my services does not match the current time
- Make sure you’ve changed the timezone.
- Stop and rebuild the containers (
docker-compose up -d --build <services>
)
I get MySQL connection refused
This error sometimes happens because your Laravel application isn’t running on the container localhost IP (Which is <IP_ADDRESS>). Steps to fix it:
- Option A
- Check your running Laravel application IP by dumping
Request::ip()
variable usingdd(Request::ip())
anywhere on your application. The result is the IP of your Laravel container. - Change the
DB_HOST
variable on env with the IP that you received from previous step.
- Check your running Laravel application IP by dumping
- Option B
- Change the
DB_HOST
value to the same name as the MySQL docker container. The Laradock docker-compose file currently has this asmysql
- Change the
I get stuck when building nginx on (fetch mirrors.aliyun.com/alpine/v3.5/main/x86_64/APKINDEX.tar.gz)
As stated on #749, Already fixed，just set CHANGE_SOURCE
to false.
Custom composer repo packagist url and npm registry url
In China, the origin source of composer and npm is very slow. You can add WORKSPACE_NPM_REGISTRY
and WORKSPACE_COMPOSER_REPO_PACKAGIST
config in .env
to use your custom source.
Example:
WORKSPACE_NPM_REGISTRY=https://registry.npm.taobao.org
WORKSPACE_COMPOSER_REPO_PACKAGIST=https://packagist.phpcomposer.com
I got (Module build failed: Error: write EPIPE) while compiling react application
When you run npm build
or yarn dev
building a react application using webpack with elixir you may receive a Error: write EPIPE
while processing .jpg images.
This is caused of an outdated library for processing .jpg files in ubuntu 16.04.
To fix the problem you can follow those steps
1 - Open the .env
.
2 - Search for WORKSPACE_INSTALL_LIBPNG
or add the key if missing.
3 - Set the value to true:
WORKSPACE_INSTALL_LIBPNG=true
4 - Finally rebuild the workspace image
docker-compose build workspace
7. Contributing
Have a Question
If you have questions about how to use Laradock, please direct your questions to the discussion on Gitter. If you believe your question could help others, then consider opening an Issue (it will be labeled as Question
) And you can still seek help on Gitter for it.
Found an Issue
If you have an issue or you found a typo in the documentation, you can help us by opening an Issue.
Steps to do before opening an Issue:
Before you submit your issue search the archive, maybe your question was already answered couple hours ago (search in the closed Issues as well).
Decide if the Issue belongs to this project or to Docker itself! or even the tool you are using such as Nginx or MongoDB…
If your issue appears to be a bug, and hasn’t been reported, then open a new issue.
This helps us maximize the effort we can spend fixing issues and adding new features, by not reporting duplicate issues.
Want a Feature
You can request a new feature by submitting an Issue (it will be labeled as Feature Suggestion
). If you would like to implement a new feature then consider submitting a Pull Request yourself.
Update the Documentation (Site)
Laradock uses Hugo as website generator tool, with the Material Docs theme. You might need to check their docs quickly.
Go the DOCUMENTATION/content
and search for the markdown file you want to edit
Note: Every folder represents a section in the sidebar “Menu”. And every page and sidebar has a weight
number to show it’s position in the site.
To update the sidebar or add a new section to it, you can edit this DOCUMENTATION/config.toml
toml file.
The site will be auto-generated in the
docs/
folder by Travis CI.
Host the documentation locally
- Install Hugo on your machine.
- Edit the
DOCUMENTATION/content
. - Delete the
/docs
folder from the root. - After you finish the editing, go to
DOCUMENTATION/
and run thehugo
command to generate the HTML docs (inside a new/docs
folder).
Support new Software (Add new Container)
Fork the repo and clone the code.
Create folder as the software name (example:
mysql
-nginx
).Add your
Dockerfile
in the folder “you may add additional files as well”.Add the software to the
docker-compose.yml
file.Make sure you follow the same code/comments style.
Add the environment variables to the
env-example
if you have any.MOST IMPORTANTLY update the
Documentation
, add as much information.Submit a Pull Request, to the
master
branch.
Edit supported Software (Edit a Container)
Fork the repo and clone the code.
Open the software (container) folder (example:
mysql
-nginx
).Edit the files.
Make sure to update the
Documentation
in case you made any changes.Submit a Pull Request, to the
master
branch.
Edit Base Image
Open any dockerfile, copy the base image name (example:
FROM phusion/baseimage:latest
).Search for the image in the Docker Hub and find the source..
Most of the image in Laradock are offical images, these projects live in other repositories and maintainer by other organizations.
Note: Laradock has two base images for (Workspace
and php-fpm
, mainly made to speed up the build time on your machine.
Find the dockerfiles, edit them and submit a Pull Request.
When updating a Laradock base image (
Workspace
orphp-fpm
), ask a project maintainer “Admin” to build a new image after your PR is merged.
Note: after the base image is updated, every dockerfile that uses that image, needs to update his base image tag to get the updated code.
Submit Pull Request Instructions
1. Before Submitting a Pull Request (PR)
Always Test everything and make sure its working:
- Pull the latest updates (or fork of you don’t have permission)
- Before editing anything:
- Test building the container (docker-compose build –no-cache container-name) build with no cache first.
- Test running the container with some other containers in real app and see of everything is working fine.
- Now edit the container (edit section by section and test rebuilding the container after every edited section)
- Testing building the container (docker-compose build container-name) with no errors.
- Test it in a real App if possible.
2. Submitting a PR
Consider the following guidelines:
Search GitHub for an open or closed Pull Request that relates to your submission. You don’t want to duplicate efforts.
Make your changes in a new git branch:
git checkout -b my-fix-branch master
Commit your changes using a descriptive commit message.
Push your branch to GitHub:
git push origin my-fix-branch
In GitHub, send a pull request to
laradock:master
.If we suggest changes then:
- Make the required updates.
- Commit your changes to your branch (e.g.
my-fix-branch
). - Push the changes to your GitHub repository (this will update your Pull Request).
If the PR gets too outdated we may ask you to rebase and force push to update the PR:
git rebase master -i
git push origin my-fix-branch -f
WARNING. Squashing or reverting commits and forced push thereafter may remove GitHub comments on code that were previously made by you and others in your commits.
3. After your PR is merged
After your pull request is merged, you can safely delete your branch and pull the changes from the main (upstream) repository:
Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
git push origin --delete my-fix-branch
Check out the master branch:
git checkout master -f
Delete the local branch:
git branch -D my-fix-branch
Update your master with the latest upstream version:
git pull --ff upstream master
Happy Coding :)
8. License
MIT License (MIT)
9. Related Projects
Laradock related projects:
- Laradock CLI by LorinLee
- Laradock Env by BAGArt
- Klaradock by Kim Hsiao
- Ansible Laradock Kubernetes by Sifat Rahim These Docker Compose projects have piqued our interest:
- MageDock by Ujjwal Ojha
- RubyDev-Dock by Diogo Scudelletti
- NoDock by Osedea
- Dockery by Taufek
- Laradock Multi by BAGArt - Laradock wrapper template for running multiple related projects with different versions of PHP and Node.js such as Microservice Architecture (MSA)
If you want your project listed here, please open an issue.


Walkthrough for robust estimation of primaries by sparse inversion via one-norm minimization
A guide to getting up and running with Robust EPSI on an example synthetic dataset
Tim Tai-Yi Lin (tlin@eos.ubc.ca), March 19th 2012
Contents
Prerequisites
- This guide assumes that you are using a unix-style terminal.
- This walkthrough also implicitly assumes that you can execute the cURL utility from the command line, which is almost always the case. Try executing curl in your terminal to see if it exists.
- Finally, the Robust EPSI program itself is written in pure MATLAB, and requires MATLAB r2009B (7.9) or newer versions.
Step 1: Obtain example dataset
First of all, make sure you are at /applications/WavefieldSeparation/RobustEPSI/ relative to the install path of the SLIM Software Release. The rest of this walkthrough will take place within this directory.
Change into the data directory, and run scons on the command line.
$ cd data $ scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... os.chdir('.') CURLGetFile(["GulfOfSuez178.su"], []) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 131M 100 131M 0 0 39.1M 0 0:00:03 0:00:03 --:--:-- 39.1M os.chdir('.') CURLGetFile(["SuezShots125.355shots.su"], []) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 521M 100 521M 0 0 36.4M 0 0:00:14 0:00:14 --:--:-- 47.6M os.chdir('.') CURLGetFile(["model1_150_by_150_shot_106_255.mat"], []) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 41.5M 100 41.5M 0 0 13.5M 0 0:00:03 0:00:03 --:--:-- 13.5M scons: done building targets.
Ensure that you end up downloading the three datafiles model1_150_by_150_shot_106_255.mat, GulfOfSuez178.su, and SuezShots125.355shots.su into this directory. If not, click here to download a zip package that contain all three files.
Step 2: Setting program parameters (using the provided SCons scripts)
Exit the data directory and enter the Synthetic directory. Much like in step 1, you will also find a SConstruct file under this directory. Run scons on the command line here.
$ scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... echo "addpath(genpath('/users/slic/timlin/Seismic/SINBAD/tools/algorithms/REPSI'));EPSI_SLIM_main('window_startT',0.15,'useOblique',1,'relError',0.05,'window_endT',1,'sol_file','/scratch/slic/timlin/RobustEPSI_SLIM/Synthetic/Synthetic_result.mat','maxTotalIter',70,'q_estLength_posT',0.1,'output_wavelet_file','Synthetic_wavelet.mat','show_preview',1,'useSparsity',0,'preview_file','Preview/Synthetic_preview.mat','input_file','../data/model1_150_by_150_shot_106_255.mat','padtime',11,'output_primary_file','Synthetic_primary.mat','parallel',0,'topmuteT',0.15,'verbosity',0,'savepreviewmat',1,'output_primaryIR_file','Synthetic_primaryIR.mat','q_estLength_negT',0.1);" > Synthetic.m echo "addpath(genpath('/users/slic/timlin/Seismic/SINBAD/tools/algorithms/REPSI'));EPSI_SLIM_main('window_startT',0.15,'useOblique',1,'relError',0.05,'window_endT',1,'sol_file','/scratch/slic/timlin/RobustEPSI_SLIM/Synthetic/Synthetic_sparsity_result.mat','maxTotalIter',70,'q_estLength_posT',0.1,'output_wavelet_file','Synthetic_sparsity_wavelet.mat','show_preview',1,'useSparsity',1,'preview_file','Preview/Synthetic_sparsity_preview.mat','input_file','../data/model1_150_by_150_shot_106_255.mat','padtime',11,'output_primary_file','Synthetic_sparsity_primary.mat','parallel',0,'topmuteT',0.15,'verbosity',0,'savepreviewmat',1,'output_primaryIR_file','Synthetic_sparsity_primaryIR.mat','q_estLength_negT',0.1);" > Synthetic_sparsity.m echo "addpath(genpath('/users/slic/timlin/Seismic/SINBAD/tools/algorithms/REPSI'));EPSI_SLIM_main('window_startT',0.15,'useOblique',1,'relError',0.05,'window_endT',1,'sol_file','/scratch/slic/timlin/RobustEPSI_SLIM/Synthetic/Synthetic_sparsity_parallel_result.mat','maxTotalIter',70,'q_estLength_posT',0.1,'output_wavelet_file','Synthetic_sparsity_parallel_wavelet.mat','show_preview',1,'useSparsity',1,'preview_file','Preview/Synthetic_sparsity_parallel_preview.mat','input_file','../data/model1_150_by_150_shot_106_255.mat','padtime',11,'output_primary_file','Synthetic_sparsity_parallel_primary.mat','parallel',1,'topmuteT',0.15,'verbosity',0,'savepreviewmat',1,'output_primaryIR_file','Synthetic_sparsity_parallel_primaryIR.mat','q_estLength_negT',0.1);" > Synthetic_sparsity_parallel.m scons: done building targets.
While the output looks complicated, what has really happened is that three MATLAB scripts have been generated, each one will execute the Robust EPSI program with slightly different parameters. (This script was only tested in the BASH shell; if you use a different shell and it doesn't work, e-mail me) To understand what is going on, let's look into the SConstruct file. The interesting part starts at line 49:
# define a common set of options commonopt={} commonopt["matlab_func"] = default_matfcts commonopt["input_file"] = "../data/model1_150_by_150_shot_106_255.mat" commonopt["maxTotalIter"] = 70 commonopt["padtime"] = 11 commonopt["topmuteT"] = 0.15 commonopt["q_estLength_posT"] = 0.1 commonopt["q_estLength_negT"] = 0.1 commonopt["useOblique"] = 1 commonopt["relError"] = 0.05 commonopt["window_startT"] = 0.15 commonopt["window_endT"] = 1 commonopt["savepreviewmat"] = 1 commonopt["show_preview"] = 1 commonopt["verbosity"] = 0
This section defines default settings for each program. For the SINBAD software release, Robust EPSI is organized such that each of the folders Synthetic, GulfOfSuez178, and GulfOfSuez355 correspond to a specific dataset (see README_examples.txt for more information), and therefore the settings above are specific to one dataset.
It may look like there is a lot of settings, but only a few of these are truly important: input_file, topmuteT, maxTotalIter, and relError. The rest are typical default values that is simply included here for the sake of explicitness. See the included PARAMETERS_LIST.txt file for more detials regarding these parameters.
The next three blocks in the SConstruct file corresponds to the three MATLAB scripts that were outputted when we ran SCons. Each block does the same thing:
- clone the default settings in commonopt (technically by cloning the Python dict obtect)
- give this new "experiment" a different name (this will end up determining the name of the resulting MATLAB script)
- add some additional parameter settings
- append this particular "experiment" to the list that keeps track of all experiments to generate custom MATLAB scripts for.
# Serial version without using sparsity frames expr=commonopt.copy() expr["name"] = "Synthetic" expr["useSparsity"] = 0 expr["parallel"] = 0 expr["output_primary_file"] = expr["name"] + "_primary.mat" expr["output_primaryIR_file"] = expr["name"] + "_primaryIR.mat" expr["output_wavelet_file"] = expr["name"] + "_wavelet.mat" runs.append(expr)
It is perhaps best to think of this script as a preference file. The above block will generate the file Synthetic.m in the Synthetic directory. If you look into this script, you will see that it simply calls the main Robust EPSI driver EPSI_SLIM_main.m with the specified parameters passed in as keyword-argument pairs.
You are of course free to set your own parameters. Any parameter in PARAMETERS_LIST.txt can be specified by copying the convention here. If you don't want to override existing settings, simply copy and insert the above block below all the others and give it a new name.
For more information on the different settings I have provided here, and also how you can use your own dataset, please see the included README_examples.txt file.
Step 3: Execute the Robust EPSI program
With all the parameters already set, executing the program is very easy. Simply enter MATLAB and execute any one of the scripts. Synthetic.m is a short example of Robust EPSI executed on a small synthetic dataset for 70 iterations, and should take no more than half-an-hour on a machine with >4GB memory.
>> Synthetic Loading SLIM Toolboxes from /users/slic/timlin/Seismic/SINBAD Done loading SLIM Toolboxes Reading from a matlab datafile... One-norm of the datacube: 4316425.5901 Inf-norm of the datacube: 12.9496 Two-norm of the datacube: 3151.6429 Preparing for Robust EPSI processing...  Writing primaries to a matlab datafile... Writing source wavelet to a matlab datafile... ... Finished.
You can set verbosity = 1 to enable more detailed output of the optimization algorithms used to solve for the surface-free impulse response and the source wavelet.
Step 4: Viewing the result
The script we just executed above is set to save the resulting output to the files Synthetic_primary.mat, Synthetic_primaryIR.mat, and Synthetic_wavelet.corrected.mat. You can view them by opening the files in MATLAB. You can also have Robust EPSI output SU file or native single-precision binary blobs by setting the extension to ".su" and ".bin" respectively.
We also have a built-in utility (/tools/algorithms/REPSI/display_Preview.m) for viewing a small preview of the result (generated in the Preview subdirectory when the parameter savepreviewmat = 1). In Synthetic.m setting it is set to execute automatically, but you can run it in a standalone fashion:
display_Preview('../Synthetic/Preview/Synthetic_preview.mat')
This concludes the tutorial on executing Robust EPSI using the built-in dataset. Please feel free to play with different settings or use your own dataset. See README_examples.txt for more information.


{% load static %}
You have 2 unread mails
Plant Status Notification
Plant 14 moisture surpass critical value.
Irrigation System Notification
Valve 3 water volume has been set to 3L
{{user.username}}
Administrator
Please Login


A review by John Beachem
* 1/2
CAST Jennifer Love Hewitt - Julie James Freddie Prinze Jr. - Ray Bronson Sarah Michelle Gellar - Helen Shivers Ryan Phillippe - Barry Cox
If there is one universal rule in Hollywood, it is that all successful movies will have a horde of clones following close behind. Such is the case with "I Know What You Did Last Summer". A cheap, predictable, pathetic excuse for a slasher movie, it tries to follow in the footsteps of Wes Craven's highly entertaining "Scream" with disasterous results.
Four teenagers celebrate their graduation from high school in typical teen age fashion. They drive to the beach, get drunk, and head back only to hit someone on the road. They then choose to dump the body in the sea, make a pact never to mention it again, and go on with their happy little lives. A year later, they begin receiving threats and are eventually attacked by someone who claims to know what they did the previous year.
I'm going to keep the rest of this review very short, because I don't want to go off on a two hour rant about how awful this movie was. First, let me point out how completely devoid of anything resembling a scare this film was. Second, if there is one thing I simply cannot stand it is long chase scenes which drag on for at least twenty minutes only to end in the exact way we knew they were going to before they started. Third, and final, I'm not going to reveal who the killer is, but if I were to tell you, it would hardly be classified as a spoiler since the character is only introduced at that point.
The only reason I gave this piece of garbage an extra half star is because of the performances of the two female leads. They both try valiantly to add something to this pitiful excuse for a horror movie, and I commend them for their effort.  I give it a measly star and a half.
* * * * * - One of the greatest movies ever, see it now. * * * * - Great flick. Try and catch this one. * * * - Okay movie, hits and misses. * * - Pretty bad. See it if you've got nothing better to do. * - One of the worst movies ever. See it only if you enjoy pain.
E-mail with comments at<EMAIL_ADDRESS>The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


<lexer>
¶
A sample XML for the <lexer>
section looks like:
<lexer table="ecs">
<shortcut name="nonws">[^ \t\r\n]</shortcut>
<shortcut name="word">{nonws}+</shortcut>
<rule>
<pattern>{word}</pattern>
<pattern>{word}[ \t\r\n]*</pattern>
<action>
++wordCount;
</action>
</rule>
<state name="INITIAL,TEST">
<rule>
<pattern>.|\n</pattern>
<action>
// ignore
</action>
</rule>
<rule state="ANOTHER_STATE">
<pattern><![CDATA[<<EOF>>]]></pattern>
<action>
return 0; /* exit lexer loop */
</action>
</rule>
</state>
</lexer>
Options for the lexer are specified as attributes of the <lexer>
tag.
| Attribute | Description |
|---|---|
table |
The DFA table format. Can be one of "ecs" ,
"full" , "compressed" options. Command
line options can override the choice here. |
bol |
Instruct the lexer to keep track of the BOL (beginning of line) information even when there are no patterns use that information. |
warnbackup |
Generate warning of backup lexer states if set to true. Default is false. |
yywrap |
Indicates that yyWrap () function should be
called when EOF is encountered. Default is false. |
linemode |
Instruct the lexer to match patterns one line at
a time. This mode is primarily useful for
interactive modes where inputs are delimited by
'\n' character. Multi-line patterns will
generate warnings since they cannot be matched in
this mode. |
<shortcut>
¶
This tag is used to specify frequently used subset of patterns. In the
above example, when the pattern {word}
is seen, it is replaced with
({nonws})
, which is in turn replaced with ([^ \t\r\n])
. So the
actual pattern is [^ \t\r\n]+
.
<shortcut>
tags can only be specified as immediate children of
<lexer>
.
<state>
¶
<state>
tags are used to indicate the state conditions. It has only
one attribute name
to specify a comma separated list of state names.
All rules specified under this tag are automatically added to this
particular state. If the name
attribute is not specified, it is
assumed to be {{{INITIAL}}, which is required as the initial state at
the start of the lexer.
<rule>
¶
Rule tags are used to specify patterns and their associated action
codes. It can have multiple <pattern>
children, but one and only one
<action>
child.
| Attribute | Description |
|---|---|
state |
A comma separated list of state names that this rule is
in. If the current rule is already under a <state>
tag, then the rule is added to all of them. |
<pattern>
¶
| Attribute | Description |
|---|---|
bol |
Specify that the pattern only works at BOL (beginning of line). |
nocase |
Specify that the pattern does case insensitive match. |
Although multiple patterns may be under the same rule and share the
action code, in actual generated code, the action code is replicated for
each pattern. This is to avoid the problem that some patterns may work
at BOL while some other patterns may not. To avoid action code
replication, try put them inside a single <pattern>
tag with |
in between.
<action>
¶
It contains the code to be executed when the pattern is matched.


--- title: A Global Community description: Launching Soon --- We are building something Awesome A Global Community for DevOps Malayalam Join ClubHouse Learn DevOps from the experts.
A Global Community for DevOps Malayalam


Before Change
return False, "Executable for %s missing" % logfn
fname_list = archive_viewer.get_archive_content(prog)
fname_list = [fn for fn in fname_list]
pattern_list = eval(open(logfn, text_read_mode).read())
// Alphabetical order of patterns.
pattern_list.sort()
missing = []
After Change
return False, "Executable for %s missing" % logfn
fname_list = archive_viewer.get_archive_content(prog)
fname_list = [fn for fn in fname_list]
with open(logfn, text_read_mode) as fp:
pattern_list = eval(fp.read())
// Alphabetical order of patterns.
pattern_list.sort()
missing = []
for pattern in pattern_list:
for fname in fname_list:


|
Marilyn ChambersAdult film actress who got her start in Behind the Green Door, a landmark film produced by the Mitchell Brothers and co-starring porn legend John Holmes.Did some commercial work before her career in the adult film industry. Marilyn Briggs appeared in television spots for Pepsi-Cola, and a (now infamous) Ivory Snow box holding a baby. Arrested for prostitution in February 1985 at the O'Farrell Theater in San Francisco. "I don't take tips, so how could I be soliciting?" On July 28, 1999, Marilyn made her triumphant return to the O'Farrell Theater in San Francisco. Mayor Willie Brown proclaimed it "Marilyn Chambers Day."
|


{% extends 'tgrsite/main.html' %} {% block title %}All Achievements{% endblock %} {% block pagetitle %}Achievements {{achievement_count}} / {{achievement_total}}{% endblock %} {% block breadcrumbs_child %}Achievements{% endblock %} {% block body %}
{% if is_yours %}You have{% else %}{{name}} has{% endif %} achieved {{achievement_count}} out of {{achievement_total}} possible achievements!
If you believe that {% if is_yours %}you{% else %}{{name}}{% endif %} should have an achievement but it's not here, contact the Web Admin.
Try to catch them all!
{% include "users/achievements.html" with achievements=achievements %} {% endblock %}


Lean Consultants is an International Lean Kaizen consulting firm helping its clients to achieve significant growth in Profits and Revenues through operations excellence. Lean Consulting is one of the fastest growing Lean Kaizen Management Consulting company in Kenya. We have extensive expertise in helping our client companies’ implement Lean Management systems in order to become more cost effective, efficient, flexible and LEAN in their operations.
At Lean Consultants we are committed to helping our clients to build high performance organisation, always striving for Excellence by establishing a culture of Retaining Improvements, Continually Improving and achieving Breakthroughs in business performance.
With successful implementation of Lean Kaizen tools & techniques, the key resources in any organisation “PEOPLE” see benefits of continuous improvement in every aspect of job or function. Kaizen Approach to business help our clients improve productivity, performance & profitability drastically & thereby increasing their customer satisfaction.
Uniqueness:
- Our services are specifically meant for SMEs where therefore are affordable, accessible, applicable, and useful and delivered for fit in local context
- Supper Services and solutions borrowed from various disciplines: Operations Mgt, lean/kaizen, six sigma, Quality Mgt, ISO standards, Agile/scrum methodologies, Project Mgt, Performance Mgt, Business Mgt, problems solving, Change mgt.
- Availability for working hand in hand with our customers so that they can deliver high value to their customers hence increased profitability and business sustainability.


Users are dangerous
Users are at the forefront of most experiences when external users or customers interact with a company. Ranging from customer services to IT technicians, users will be using either published applications or those created in house for tasks specific to the company. With users having access to systems, comes the risk of data loss, corruption or data transferring into the hands of unauthorised people. Any compromised data integrity will result in reputational and financial damage. With recent EU GDPR laws having been updated and enforced from 25th May 2018, companies can now get a fine of up to 4% of their worldwide annual turnover and a ban on data processing. With such severe consequences, important processes must be in place within the company to mitigate risk and penalty upon breach.
IBM’s 2014 Cyber Security Intelligence Index stated that 95% of security breaches were caused by human error, with the highest contributing factor being malicious emails. There are many factors that can cause users to be the key to a security breach. With Cisco’s 2018 Annual Cybersecurity Report showing phishing the top entry point for a breach. A notable example of a phishing email attack was the 2015 Anthem data breach. It was believed to have started due to the stealing of “credentials of five different tech workers, possibly through some kind of “phishing” scheme” (Insurance Journal, 2015). Unfortunately, there are still many practices that users follow for ease of work, rather than the security of the company. Writing down or sharing passwords are prime examples of how users, seek the simplest way to work, without considering the implications and risks it involves. Due to the technical skills of most users, they are unable to fully understand the consequences of what these types of incidents can lead to. Other than financial and reputational damage, a breach and lead to the destruction of misuse of data. This In turn, without sufficient backups, could break the company and shut it down. Best practices to mitigate user risk. As with human error, expecting a 100% risk-free environment is nearly impossible to accomplish. Following industry best practices is key to mitigating potential dangers. Industry best practices will usually be set by the technology creator, for example, Microsoft and Active Directory or Cisco IOS.
It is important to apply all updates to any technology used from these manufacturers, as they will be patching any undisclosed or public security concerns. Hackers will constantly be finding bugs and exploits within technology. Users will be the hackers gate into a computer system. This will work by users allowing them access, usually by accident malicious code, most commonly within social engineered emails. Parallel with patching via vendors, systems should also follow all configuration best practises recommended by the vendor. Vendors will have completed rigorous testing on their technology so are best accustomed to make the best decisions on how to securely use their systems. In regard to basic user configuration, in a Windows environment, Microsoft have best practices on how to use Active Directory and Group Policy. Administrators are recommended basic steps such as password complexity and force password change every 90 days minimum. It will be important to only provide users with the lowest permissions they will need.
User Training will make a big difference to a company’s workforce. Teaching users about basic cybersecurity, for example, not clicking on links within emails that you were not expecting. A good example of this training will be phishing test software such as Sophos. It allows an organised and controlled sending of customised phishing attacks on behalf of the company. This will allow tracking of users who have actioned the suspicious email with a click. Once a company has a list of these users, it can pinpoint training to those who are susceptible to phishing attacks. Alongside these tests, users should undertake training, normally with a compliance department or IT. User attacks can start from poor user management. It is vital to remove and disable all accounts once a user has left, even more importantly, if they were an administrator to any system or were able to log in remotely. Disgruntled users can seek to cause damage to a company due to spite. With most companies using remote workers, it’s crucial to ensure that the users can continue to work off-site in conjunction with secure data. Device encryption together with 2-factor authentication is the safest method of creating such an environment. This will allow all data to safe if the user loses who has their laptop stolen. Conclusion
As much as users pose a threat to business, there are many ways to limit damage or prevent accidental damage to start with. With basic steps being taken by companies to ensure mitigation, as described by IBM’s 2014 Cyber Security Intelligence Index, only 5% of breaches would be successful. It is important to follow all steps ranging from patch management, configuration, user management, training, and encryption. Once all steps are firmly satisfied, a company should be safe from a breach resulting from a user. With staff turn around, there will always be a need to refresh these principles to ensure a continuously safe environment


|
libtest
0.1.0
A test library
|
API interface test is in charge of path management. More...
Go to the source code of this file.
Enumerations | |
| enum | API_RESULT_CODE { API_SUCCESS, API_FAILED } |
Functions | |
| int | test_init () |
| Initialize libtest-api. | |
| int | test_deinit () |
| Finalize libtest-api. | |
| int | test_get_paths (char ***paths, int *count) |
| Obtain current list of path. |
API interface test is in charge of path management.
It provides APIs to query path list and to query properties for a specific path.
Besides, you should keep main loop idle for most of times in order to get callbacks and make sure libtest-api process signals successfully. This means you should put business logic into a separate thread.
| enum API_RESULT_CODE |
| int test_deinit | ( | ) |
Finalize libtest-api.
This function is designated to be called when no longer needs libtest-api to release resources in libtest and do some finalization.
| int test_get_paths | ( | char *** | paths, |
| int * | count | ||
| ) |
Obtain current list of path.
| [out] | paths | a pointer to an array of strings |
| [out] | count | indicating the count of path. |
char **path = NULL; int count = 0; test_get_paths(&path, &count); // use the path free(path); path = NULL;
| int test_init | ( | ) |
Initialize libtest-api.
This function should be the first one to call when using libtest-api. It does essential initializations. This function is synchronous.
if (test_init() != OFONO_API_SUCCESS) { printf("error occurred, failed to init test\n"); return; } // operations goes here if (test_deinit() != OFONO_API_SUCCESS) { printf("failed to deinit \n"); return; }


{% load static %}
{% block includes %} {% endblock %}
DangerDon
Albums
Songs
Search
Add Albums
Log Out
{% block body %} {% endblock %}


In the construction arena, CK&A has skillfully counseled clients whether businesses or individuals in matters pertaining to all aspects of new construction or renovation: the bidding process, liens, extras and change orders, construction damage claims, payment and job completion claims.
We have represented owners, general contractors, subcontractors, sub-subcontractors and suppliers in all types of construction matters.
CK&A’s lawyers have prepared and collected mechanic’s lien claims involving such notable Chicagoland properties as the Merchandise Mart, John G. Shedd Aquarium, Chicago Board of Trade, Civic Opera House, Encyclopedia Britannica Building, Michael Reese Hospital and Waukegan Port District. We also have prepared and enforced, or defended against, mechanic’s lien claims on residential properties.
We can represent your interests in construction matters from conception through final completion of commercial or residential construction.


Computer Vision Local Minima Correlation VS Convolution Stationarity of Statistics in terms of CV Sparse Coding
Deep Learning RNN Attention Mechanism Autoencoder Analytic Gradient vs Numerical Gradient Whitening Local Response Normalization LRN vs BN Batch Normalization AlexNet


Deleting Selected Exceptions
How to delete one or more logged event records from the Log Viewer module. Restricted to SuperUsers.
- Navigate to Admin > Event Viewer - OR - Navigate to a Log Viewer module.
- Expand the Viewer section.
- At Website, select All to view events from all sites - OR - Select a site name to view events from that site only.
- Mark the check box beside each record to be deleted.
- Click the Delete Selected Entries button.


Toys for the 999dice.com site
Hi. toplel (HAMBONING - 15438750) here.
I made this repo so those jokesters won't clone and tamper with the scripts anymore.
This is the only place I'll post 999dice related code.
Note the date, it should be the oldest one in case any clown clones this too.
If you can't read code and see someone else posting links that have long chunks that don't look like english stay away, it's probably not good for you.
Beer piggybank: 17EqPZdWGZe2MzRMFyNsDevFM3744VdxgK or heck, even doges DPpWzfku14PanfwZgNczCcZxny52nYjMBa


We embody the time-honored traditions of brewing great beer while constantly innovating to drive the industry forward. We strive for excellence in everything we do. We are home to iconic, beloved brands. And we are leading the industry into the future by growing beyond beer to offer new beverages for every person, for every occasion.
Founded more than 165 years ago, Anheuser-Busch is one of America’s most iconic companies and the undisputed leader of the U.S. beer industry. We are proud of our
history and heritage in this country and we remain
committed to brewing the great-tasting, high-quality beers that have satisfied beer drinkers for generations.