Compare commits
39 Commits
Author | SHA1 | Date | |
---|---|---|---|
2ec23122e7 | |||
a1e01ac19b | |||
eccc149f45 | |||
9cb7624da7 | |||
cd1c56c1e2 | |||
9d42ea6b9d | |||
b0bfa5f1d3 | |||
dcf6b6d9ac | |||
1d9cbd7c75 | |||
fd56c4dcda | |||
0351cf531b | |||
09e998b723 | |||
06d0105514 | |||
0cbc51bf72 | |||
08dfc9f816 | |||
b71f50bf83 | |||
7d1dc66f77 | |||
f3c934222f | |||
a90865d67c | |||
a0a5c85a54 | |||
a807caa30a | |||
bc27e96337 | |||
11912055ec | |||
3509473b89 | |||
5521f71428 | |||
339d47f303 | |||
600a6154b4 | |||
4673ba7b31 | |||
154249a08f | |||
5bffd43b55 | |||
0e9d044c6f | |||
7199ae5a34 | |||
6caa4c5fb9 | |||
75b3fa499e | |||
999118b674 | |||
4b2c440146 | |||
65444d39b6 | |||
ad1509dd62 | |||
9ab84c5174 |
@ -73,7 +73,7 @@ To update the sidebar or add a new section to it, you can edit this `DOCUMENTATI
|
||||
|
||||
* Add the environment variables to the `env-example` if you have any.
|
||||
|
||||
* **MOST IMPORTANTLY** updated the `Documentation`, add as much information.
|
||||
* **MOST IMPORTANTLY** update the `Documentation`, add as much information.
|
||||
|
||||
* Submit a Pull Request, to the `master` branch.
|
||||
|
||||
@ -100,7 +100,7 @@ To update the sidebar or add a new section to it, you can edit this `DOCUMENTATI
|
||||
|
||||
* Search for the image in the [Docker Hub](https://hub.docker.com/search/) and find the source..
|
||||
|
||||
*Most of the image in Laradock are offical images, these projects live in other repositories and maintainer by other orgnizations.*
|
||||
*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.
|
||||
|
||||
|
@ -7,6 +7,8 @@ weight: 3
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="List-current-running-Containers"></a>
|
||||
## List current running Containers
|
||||
```bash
|
||||
@ -134,6 +136,7 @@ More info on Containers rebuilding [here](#Build-Re-build-Containers).
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Build-Re-build-Containers"></a>
|
||||
## Build/Re-build Containers
|
||||
@ -155,6 +158,7 @@ You might use the `--no-cache` option if you want full rebuilding (`docker-compo
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Add-Docker-Images"></a>
|
||||
## Add more Software (Docker Images)
|
||||
@ -188,8 +192,6 @@ More [options](https://docs.docker.com/compose/reference/logs/)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="PHP"></a>
|
||||
|
||||
@ -201,7 +203,7 @@ More [options](https://docs.docker.com/compose/reference/logs/)
|
||||
<a name="Install-PHP-Extensions"></a>
|
||||
## Install PHP Extensions
|
||||
|
||||
Before installing PHP extensions, you have to decide whether you need for the `FPM` or `CLI` because each lives on a different container, if you need it for both you have to edit both containers.
|
||||
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)*.
|
||||
<br>
|
||||
@ -243,6 +245,8 @@ docker-compose build php-fpm
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Change-the-PHP-CLI-Version"></a>
|
||||
## Change the PHP-CLI Version
|
||||
@ -271,53 +275,50 @@ docker-compose build workspace
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Install-xDebug"></a>
|
||||
## Install xDebug
|
||||
|
||||
1 - First install `xDebug` in the Workspace and the PHP-FPM Containers:
|
||||
<br>
|
||||
a) open the `docker-compose.yml` file
|
||||
a) open the `.env` file
|
||||
<br>
|
||||
b) search for the `INSTALL_XDEBUG` argument under the Workspace Container
|
||||
b) search for the `WORKSPACE_INSTALL_XDEBUG` argument under the Workspace Container
|
||||
<br>
|
||||
c) set it to `true`
|
||||
<br>
|
||||
d) search for the `INSTALL_XDEBUG` argument under the PHP-FPM Container
|
||||
d) search for the `PHP_FPM_INSTALL_XDEBUG` argument under the PHP-FPM Container
|
||||
<br>
|
||||
e) set it to `true`
|
||||
|
||||
It should be like this:
|
||||
|
||||
```yml
|
||||
workspace:
|
||||
build:
|
||||
context: ./workspace
|
||||
args:
|
||||
- INSTALL_XDEBUG=true
|
||||
...
|
||||
php-fpm:
|
||||
build:
|
||||
context: ./php-fpm
|
||||
args:
|
||||
- INSTALL_XDEBUG=true
|
||||
...
|
||||
```
|
||||
|
||||
2 - Open `laradock/workspace/xdebug.ini` and `laradock/php-fpm/xdebug.ini` and enable at least the following configurations:
|
||||
|
||||
```
|
||||
xdebug.remote_autostart=1
|
||||
xdebug.remote_enable=1
|
||||
xdebug.remote_connect_back=0
|
||||
; NOTE: The dockerhost is your vEthernet (DockerNAT) IP
|
||||
xdebug.remote_host=dockerhost
|
||||
```
|
||||
|
||||
3 - Re-build the containers `docker-compose build workspace php-fpm`
|
||||
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](https://github.com/LarryEitel/laravel-laradock-phpstorm) or follow up on the next section if you use linux and PhpStorm.
|
||||
|
||||
<br>
|
||||
<a name="Install-phpdbg"></a>
|
||||
## Install phpdbg
|
||||
|
||||
Install `phpdbg` in the Workspace and the PHP-FPM Containers:
|
||||
|
||||
<br>
|
||||
1 - Open the `.env`.
|
||||
|
||||
2 - Search for `WORKSPACE_INSTALL_PHPDBG`.
|
||||
|
||||
3 - Set value to `true`
|
||||
|
||||
4 - Do the same for `PHP_FPM_INSTALL_PHPDBG`
|
||||
|
||||
```dotenv
|
||||
WORKSPACE_INSTALL_PHPDBG=true
|
||||
```
|
||||
```dotenv
|
||||
PHP_FPM_INSTALL_PHPDBG=true
|
||||
```
|
||||
|
||||
|
||||
<a name="Setup remote debugging for PhpStorm on Linux"></a>
|
||||
## Setup remote debugging for PhpStorm on Linux
|
||||
@ -358,24 +359,13 @@ Note: If `.php-fpm/xdebug` doesn't execute and gives `Permission Denied` error t
|
||||
<a name="Install-Deployer"></a>
|
||||
## Install Deployer (Deployment tool for PHP)
|
||||
|
||||
1 - Open the `docker-compose.yml` file
|
||||
1 - Open the `.env` file
|
||||
<br>
|
||||
2 - Search for the `INSTALL_DEPLOYER` argument under the Workspace Container
|
||||
2 - Search for the `WORKSPACE_INSTALL_DEPLOYER` argument under the Workspace Container
|
||||
<br>
|
||||
3 - Set it to `true`
|
||||
<br>
|
||||
|
||||
It should be like this:
|
||||
|
||||
```yml
|
||||
workspace:
|
||||
build:
|
||||
context: ./workspace
|
||||
args:
|
||||
- INSTALL_DEPLOYER=true
|
||||
...
|
||||
```
|
||||
|
||||
4 - Re-build the containers `docker-compose build workspace`
|
||||
|
||||
[**Deployer Documentation Here**](https://deployer.org/docs)
|
||||
@ -384,6 +374,7 @@ It should be like this:
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Production"></a>
|
||||
|
||||
@ -422,35 +413,15 @@ To learn more about how Docker publishes ports, please read [this excellent post
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-Jenkins"></a>
|
||||
## 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 chanhed 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.
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Laravel"></a>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<a name="Install-Laravel"></a>
|
||||
## Install Laravel from a Docker Container
|
||||
|
||||
@ -570,6 +541,52 @@ docker-compose up -d php-worker
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-NetData"></a>
|
||||
## Use NetData
|
||||
|
||||
1 - Run the NetData Container (`netdata`) with the `docker-compose up` command. Example:
|
||||
|
||||
```bash
|
||||
docker-compose up -d netdata
|
||||
```
|
||||
|
||||
2 - Open your browser and visit the localhost on port **19999**: `http://localhost:19999`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-Jenkins"></a>
|
||||
## 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 chanhed 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.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-Redis"></a>
|
||||
## Use Redis
|
||||
@ -631,33 +648,16 @@ composer require predis/predis:^1.0
|
||||
|
||||
1 - First install `mongo` in the Workspace and the PHP-FPM Containers:
|
||||
<br>
|
||||
a) open the `docker-compose.yml` file
|
||||
a) open the `.env` file
|
||||
<br>
|
||||
b) search for the `INSTALL_MONGO` argument under the Workspace Container
|
||||
b) search for the `WORKSPACE_INSTALL_MONGO` argument under the Workspace Container
|
||||
<br>
|
||||
c) set it to `true`
|
||||
<br>
|
||||
d) search for the `INSTALL_MONGO` argument under the PHP-FPM Container
|
||||
d) search for the `PHP_FPM_INSTALL_MONGO` argument under the PHP-FPM Container
|
||||
<br>
|
||||
e) set it to `true`
|
||||
|
||||
It should be like this:
|
||||
|
||||
```yml
|
||||
workspace:
|
||||
build:
|
||||
context: ./workspace
|
||||
args:
|
||||
- INSTALL_MONGO=true
|
||||
...
|
||||
php-fpm:
|
||||
build:
|
||||
context: ./php-fpm
|
||||
args:
|
||||
- INSTALL_MONGO=true
|
||||
...
|
||||
```
|
||||
|
||||
2 - Re-build the containers `docker-compose build workspace php-fpm`
|
||||
|
||||
|
||||
@ -756,6 +756,8 @@ docker-compose up -d adminer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-Portainer"></a>
|
||||
## Use Portainer
|
||||
@ -772,6 +774,7 @@ docker-compose up -d portainer
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-pgAdmin"></a>
|
||||
## Use PgAdmin
|
||||
@ -924,6 +927,10 @@ docker-compose up -d rethinkdb
|
||||
- set the `DB_DATABASE` to `database`.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-Minio"></a>
|
||||
## Use Minio
|
||||
@ -956,6 +963,9 @@ docker-compose up -d minio
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Use-AWS"></a>
|
||||
## Use AWS
|
||||
@ -971,7 +981,10 @@ 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, initiaze your project first by doing 'eb init'. Read the [aws eb cli](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-configuration.html) docs for more details.
|
||||
4 - To start using eb cli inside the container, initialize your project first by doing 'eb init'. Read the [aws eb cli](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-configuration.html) docs for more details.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -989,7 +1002,10 @@ 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` Passwort = `admin`. Change the password in the webinterface if you want to.
|
||||
4 - Login using the credentials User = `admin`, Password = `admin`. Change the password in the web interface if you want to.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1014,6 +1030,11 @@ To install CodeIgniter 3 on Laradock all you have to do is the following simple
|
||||
3 - Re-build your PHP-FPM Container `docker-compose build php-fpm`.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Install-Symfony"></a>
|
||||
## Install Symfony
|
||||
|
||||
@ -1027,6 +1048,11 @@ To install CodeIgniter 3 on Laradock all you have to do is the following simple
|
||||
|
||||
5 - Visit `symfony.test`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Misc"></a>
|
||||
## Miscellaneous
|
||||
@ -1110,6 +1136,11 @@ ssh -o PasswordAuthentication=no \
|
||||
|
||||
To login as root, replace laradock@locahost with root@localhost.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Change-the-MySQL-Version"></a>
|
||||
## Change the (MySQL) Version
|
||||
@ -1164,6 +1195,7 @@ The default username and password for the root MySQL user are `root` and `root `
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Create-Multiple-Databases"></a>
|
||||
## Create Multiple Databases (MySQL)
|
||||
@ -1178,6 +1210,8 @@ GRANT ALL ON `your_db_1`.* TO 'mysql_user'@'%' ;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Change-MySQL-port"></a>
|
||||
## Change MySQL port
|
||||
@ -1228,20 +1262,10 @@ server_name laravel.test;
|
||||
|
||||
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 `docker-compose.yml` file
|
||||
1 - Open the `.env` file
|
||||
|
||||
2 - Search for the `COMPOSER_GLOBAL_INSTALL` argument under the Workspace Container and set it to `true`
|
||||
2 - Search for the `WORKSPACE_COMPOSER_GLOBAL_INSTALL` argument under the Workspace Container and set it to `true`
|
||||
|
||||
It should be like this:
|
||||
|
||||
```yml
|
||||
workspace:
|
||||
build:
|
||||
context: ./workspace
|
||||
args:
|
||||
- COMPOSER_GLOBAL_INSTALL=true
|
||||
...
|
||||
```
|
||||
3 - Now add your dependencies to `workspace/composer.json`
|
||||
|
||||
4 - Re-build the Workspace Container `docker-compose build workspace`
|
||||
@ -1280,20 +1304,9 @@ c - Re-build the Workspace Container `docker-compose build workspace`
|
||||
|
||||
To install NVM and NodeJS in the Workspace container
|
||||
|
||||
1 - Open the `docker-compose.yml` file
|
||||
1 - Open the `.env` file
|
||||
|
||||
2 - Search for the `INSTALL_NODE` argument under the Workspace Container and set it to `true`
|
||||
|
||||
It should be like this:
|
||||
|
||||
```yml
|
||||
workspace:
|
||||
build:
|
||||
context: ./workspace
|
||||
args:
|
||||
- INSTALL_NODE=true
|
||||
...
|
||||
```
|
||||
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`
|
||||
|
||||
@ -1308,21 +1321,61 @@ It should be like this:
|
||||
|
||||
Yarn is a new package manager for JavaScript. It is so faster than npm, which you can find [here](http://yarnpkg.com/en/compare).To install NodeJS and [Yarn](https://yarnpkg.com/) in the Workspace container:
|
||||
|
||||
1 - Open the `docker-compose.yml` file
|
||||
1 - Open the `.env` file
|
||||
|
||||
2 - Search for the `INSTALL_NODE` and `INSTALL_YARN` argument under the Workspace Container and set it to `true`
|
||||
2 - Search for the `WORKSPACE_INSTALL_NODE` and `WORKSPACE_INSTALL_YARN` argument under the Workspace Container and set it to `true`
|
||||
|
||||
It should be like this:
|
||||
3 - Re-build the container `docker-compose build workspace`
|
||||
|
||||
```yml
|
||||
workspace:
|
||||
build:
|
||||
context: ./workspace
|
||||
args:
|
||||
- INSTALL_NODE=true
|
||||
- INSTALL_YARN=true
|
||||
...
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Install-NPM-GULP"></a>
|
||||
## 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`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Install-NPM-BOWER"></a>
|
||||
## 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`
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Install-NPM-VUE-CLI"></a>
|
||||
## 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 - Re-build the container `docker-compose build workspace`
|
||||
|
||||
@ -1337,20 +1390,9 @@ It should be like this:
|
||||
|
||||
Linuxbrew is a package manager for Linux. It is the Linux version of MacOS Homebrew and can be found [here](http://linuxbrew.sh). To install Linuxbrew in the Workspace container:
|
||||
|
||||
1 - Open the `docker-compose.yml` file
|
||||
1 - Open the `.env` file
|
||||
|
||||
2 - Search for the `INSTALL_LINUXBREW` argument under the Workspace Container and set it to `true`
|
||||
|
||||
It should be like this:
|
||||
|
||||
```yml
|
||||
workspace:
|
||||
build:
|
||||
context: ./workspace
|
||||
args:
|
||||
- INSTALL_LINUXBREW=true
|
||||
...
|
||||
```
|
||||
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`
|
||||
|
||||
@ -1358,6 +1400,7 @@ It should be like this:
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Common-Aliases"></a>
|
||||
<br>
|
||||
@ -1370,38 +1413,23 @@ You are free to modify the `aliases.sh` as you see fit, adding your own aliases
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Install-Aerospike-Extension"></a>
|
||||
## Install Aerospike extension
|
||||
|
||||
1 - First install `aerospike` in the Workspace and the PHP-FPM Containers:
|
||||
<br>
|
||||
a) open the `docker-compose.yml` file
|
||||
a) open the `.env` file
|
||||
<br>
|
||||
b) search for the `INSTALL_AEROSPIKE` argument under the Workspace Container
|
||||
b) search for the `WORKSPACE_INSTALL_AEROSPIKE` argument under the Workspace Container
|
||||
<br>
|
||||
c) set it to `true`
|
||||
<br>
|
||||
d) search for the `INSTALL_AEROSPIKE` argument under the PHP-FPM Container
|
||||
d) search for the `PHP_FPM_INSTALL_AEROSPIKE` argument under the PHP-FPM Container
|
||||
<br>
|
||||
e) set it to `true`
|
||||
|
||||
It should be like this:
|
||||
|
||||
```yml
|
||||
workspace:
|
||||
build:
|
||||
context: ./workspace
|
||||
args:
|
||||
- INSTALL_AEROSPIKE=true
|
||||
...
|
||||
php-fpm:
|
||||
build:
|
||||
context: ./php-fpm
|
||||
args:
|
||||
- INSTALL_AEROSPIKE=true
|
||||
...
|
||||
```
|
||||
<br>
|
||||
|
||||
2 - Re-build the containers `docker-compose build workspace php-fpm`
|
||||
|
||||
@ -1414,24 +1442,13 @@ It should be like this:
|
||||
<a name="Install-Laravel-Envoy"></a>
|
||||
## Install Laravel Envoy (Envoy Task Runner)
|
||||
|
||||
1 - Open the `docker-compose.yml` file
|
||||
1 - Open the `.env` file
|
||||
<br>
|
||||
2 - Search for the `INSTALL_LARAVEL_ENVOY` argument under the Workspace Container
|
||||
2 - Search for the `WORKSPACE_INSTALL_LARAVEL_ENVOY` argument under the Workspace Container
|
||||
<br>
|
||||
3 - Set it to `true`
|
||||
<br>
|
||||
|
||||
It should be like this:
|
||||
|
||||
```yml
|
||||
workspace:
|
||||
build:
|
||||
context: ./workspace
|
||||
args:
|
||||
- INSTALL_LARAVEL_ENVOY=true
|
||||
...
|
||||
```
|
||||
|
||||
4 - Re-build the containers `docker-compose build workspace`
|
||||
|
||||
[**Laravel Envoy Documentation Here**](https://laravel.com/docs/5.3/envoy)
|
||||
@ -1441,7 +1458,6 @@ It should be like this:
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="phpstorm-debugging"></a>
|
||||
## PHPStorm Debugging Guide
|
||||
@ -1454,7 +1470,6 @@ Remote debug Laravel web and phpunit tests.
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="keep-tracking-Laradock"></a>
|
||||
## Keep track of your Laradock changes
|
||||
@ -1469,7 +1484,6 @@ Remote debug Laravel web and phpunit tests.
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="upgrading-laradock"></a>
|
||||
## Upgrading Laradock
|
||||
@ -1490,9 +1504,6 @@ Moving from Docker Toolbox (VirtualBox) to Docker Native (for Mac/Windows). Requ
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Speed-MacOS"></a>
|
||||
## Improve speed on MacOS
|
||||
@ -1521,11 +1532,14 @@ Quick Setup giude, (we recommend you check their docs)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Docker-Sync"></a>
|
||||
### Workaround B: using d4m-nfs
|
||||
|
||||
You can use the d4m-nfs solution in 2 ways, one is using the Laradock built it integration, and the other is using the tool separatly. Below is show case of both methods:
|
||||
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
|
||||
@ -1610,8 +1624,6 @@ Visit the [docker-sync documentation](https://github.com/EugenMayer/docker-sync/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
### B.2: using the d4m-nfs tool
|
||||
@ -1630,7 +1642,7 @@ Click on the Docker Icon > Preferences > (remove everything form the list except
|
||||
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 follwing configuration in it:
|
||||
4) Create (or edit) the file `~/d4m-nfs/etc/d4m-nfs-mounts.txt`, and write the following configuration in it:
|
||||
|
||||
```txt
|
||||
/Users:/Users
|
||||
@ -1658,16 +1670,6 @@ docker-compose up ...
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<a name="Common-Problems"></a>
|
||||
## Common Problems
|
||||
@ -1679,7 +1681,6 @@ docker-compose up ...
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
## I see a blank (white) page instead of the Laravel 'Welcome' page!
|
||||
|
||||
@ -1693,6 +1694,7 @@ sudo chmod -R 777 storage bootstrap/cache
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
## I see "Welcome to nginx" instead of the Laravel App!
|
||||
|
||||
@ -1702,6 +1704,7 @@ Use `http://127.0.0.1` instead of `http://localhost` in your browser.
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
## I see an error message containing `address already in use` or `port is already allocated`
|
||||
|
||||
@ -1711,6 +1714,7 @@ Make sure the ports for the services that you are trying to run (22, 80, 443, 33
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
## I get NGINX error 404 Not Found on Windows.
|
||||
|
||||
@ -1723,6 +1727,7 @@ Make sure the ports for the services that you are trying to run (22, 80, 443, 33
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
## The time in my services does not match the current time
|
||||
|
||||
@ -1733,6 +1738,7 @@ Make sure the ports for the services that you are trying to run (22, 80, 443, 33
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
## I get MySQL connection refused
|
||||
|
||||
@ -1757,3 +1763,30 @@ Example:
|
||||
WORKSPACE_NPM_REGISTRY=https://registry.npm.taobao.org
|
||||
WORKSPACE_COMPOSER_REPO_PACKAGIST=https://packagist.phpcomposer.com
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
## I get `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:
|
||||
|
||||
```dotenv
|
||||
WORKSPACE_INSTALL_LIBPNG=true
|
||||
```
|
||||
|
||||
4 - Finally rebuild the workspace image
|
||||
|
||||
```bash
|
||||
docker-compose build workspace
|
||||
```
|
||||
|
||||
|
@ -143,7 +143,7 @@ If you use Chrome 63 or above for development, don't use `.dev`. [Why?](https://
|
||||
If you are using **Docker Toolbox** (VM), do one of the following:
|
||||
|
||||
- Upgrade to Docker [Native](https://www.docker.com/products/docker) for Mac/Windows (Recommended). Check out [Upgrading Laradock](/documentation/#upgrading-laradock)
|
||||
- Use Laradock v3.\*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/Laradock-ToolBox) branch. *(outdated)*
|
||||
- Use Laradock v3.\*. Visit the [Laradock-ToolBox](https://github.com/laradock/laradock/tree/LaraDock-ToolBox) branch. *(outdated)*
|
||||
|
||||
<br>
|
||||
|
||||
@ -161,11 +161,13 @@ We recommend using a Docker version which is newer than 1.13.
|
||||
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 been used.
|
||||
You can edit the `.env` file to choose which software you want to be installed in your environment. You can always refer to the `docker-compose.yml` file to see how those variables have been 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 `;`.
|
||||
|
||||
2 - Build the enviroment and run it using `docker-compose`
|
||||
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](#B) 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:
|
||||
|
||||
@ -173,7 +175,7 @@ In this example we'll see how to run NGINX (web server) and MySQL (database engi
|
||||
docker-compose up -d nginx mysql
|
||||
```
|
||||
|
||||
**Note**: The web servers `nginx`, `apache`.. all depend on `php-fpm`, means if you just run, them they will automatically run the `php-fpm` for you, so no need to specify them in the `up` command. If you don't see them running then you may need run them as follow: `docker-compose up -d nginx php-fpm 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](http://laradock.io/introduction/#supported-software-images).
|
||||
@ -203,7 +205,7 @@ docker-compose exec --user=laradock workspace bash
|
||||
*You can change the PUID (User id) and PGID (group id) variables from the `.env` file)*
|
||||
|
||||
<br>
|
||||
4 - Update your project configurations to use the database host
|
||||
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`:
|
||||
|
||||
|
@ -97,7 +97,7 @@ Beanstalkd - RabbitMQ - PHP Worker
|
||||
- **Queueing Management:**
|
||||
Beanstalkd Console - RabbitMQ Console
|
||||
- **Random Tools:**
|
||||
HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Grafana - Mailhog - MailDev - Minio - Varnish - Swoole - Portainer - Laravel Echo...
|
||||
HAProxy - Certbot - Blackfire - Selenium - Jenkins - ElasticSearch - Kibana - Grafana - Mailhog - MailDev - Minio - Varnish - Swoole - NetData - Portainer - Laravel Echo...
|
||||
|
||||
Laradock introduces the **Workspace** Image, as a development environment.
|
||||
It contains a rich set of helpful tools, all pre-configured to work and integrate with almost any combination of Containers and tools you may choose.
|
||||
|
@ -50,6 +50,7 @@ services:
|
||||
- PHP_VERSION=${PHP_VERSION}
|
||||
- INSTALL_SUBVERSION=${WORKSPACE_INSTALL_SUBVERSION}
|
||||
- INSTALL_XDEBUG=${WORKSPACE_INSTALL_XDEBUG}
|
||||
- INSTALL_PHPDBG=${WORKSPACE_INSTALL_PHPDBG}
|
||||
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
|
||||
- INSTALL_SOAP=${WORKSPACE_INSTALL_SOAP}
|
||||
- INSTALL_LDAP=${WORKSPACE_INSTALL_LDAP}
|
||||
@ -61,6 +62,9 @@ services:
|
||||
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
|
||||
- NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY}
|
||||
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN}
|
||||
- INSTALL_NPM_GULP=${WORKSPACE_INSTALL_NPM_GULP}
|
||||
- INSTALL_NPM_BOWER=${WORKSPACE_INSTALL_NPM_BOWER}
|
||||
- INSTALL_NPM_VUE_CLI=${WORKSPACE_INSTALL_NPM_VUE_CLI}
|
||||
- INSTALL_DRUSH=${WORKSPACE_INSTALL_DRUSH}
|
||||
- INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE}
|
||||
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
|
||||
@ -83,6 +87,7 @@ services:
|
||||
- INSTALL_DUSK_DEPS=${WORKSPACE_INSTALL_DUSK_DEPS}
|
||||
- INSTALL_PG_CLIENT=${WORKSPACE_INSTALL_PG_CLIENT}
|
||||
- INSTALL_SWOOLE=${WORKSPACE_INSTALL_SWOOLE}
|
||||
- INSTALL_LIBPNG=${WORKSPACE_INSTALL_LIBPNG}
|
||||
- PUID=${WORKSPACE_PUID}
|
||||
- PGID=${WORKSPACE_PGID}
|
||||
- CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION}
|
||||
@ -112,6 +117,7 @@ services:
|
||||
args:
|
||||
- PHP_VERSION=${PHP_VERSION}
|
||||
- INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG}
|
||||
- INSTALL_PHPDBG=${PHP_FPM_INSTALL_PHPDBG}
|
||||
- INSTALL_BLACKFIRE=${INSTALL_BLACKFIRE}
|
||||
- INSTALL_SOAP=${PHP_FPM_INSTALL_SOAP}
|
||||
- INSTALL_IMAP=${PHP_FPM_INSTALL_IMAP}
|
||||
@ -146,10 +152,13 @@ services:
|
||||
- "dockerhost:${DOCKER_HOST_IP}"
|
||||
environment:
|
||||
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
|
||||
- DOCKER_HOST=tcp://docker-in-docker:2375
|
||||
depends_on:
|
||||
- workspace
|
||||
networks:
|
||||
- backend
|
||||
links:
|
||||
- docker-in-docker
|
||||
|
||||
### PHP Worker ############################################
|
||||
php-worker:
|
||||
@ -322,6 +331,7 @@ services:
|
||||
build: ./postgres
|
||||
volumes:
|
||||
- ${DATA_PATH_HOST}/postgres:/var/lib/postgresql/data
|
||||
- ${POSTGRES_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
|
||||
ports:
|
||||
- "${POSTGRES_PORT}:5432"
|
||||
environment:
|
||||
@ -710,3 +720,25 @@ services:
|
||||
ports:
|
||||
- 9010:9000
|
||||
|
||||
### Docker-in-Docker ################################################
|
||||
docker-in-docker:
|
||||
image: docker:dind
|
||||
privileged: true
|
||||
volumes:
|
||||
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
|
||||
expose:
|
||||
- 2375
|
||||
networks:
|
||||
- backend
|
||||
|
||||
### NetData ################################################
|
||||
netdata:
|
||||
image: titpetric/netdata:latest
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
volumes:
|
||||
- /:/host:ro
|
||||
ports:
|
||||
- "${NETDATA_PORT}:19999"
|
||||
networks:
|
||||
- backend
|
||||
|
15
env-example
15
env-example
@ -29,6 +29,9 @@ COMPOSE_FILE=docker-compose.yml
|
||||
# Change the separator from : to ; on Windows
|
||||
COMPOSE_PATH_SEPARATOR=:
|
||||
|
||||
# Define the prefix of container names. This is useful if you have multiple projects that use laradock to have seperate containers per project.
|
||||
COMPOSE_PROJECT_NAME=laradock
|
||||
|
||||
### PHP Version ###########################################
|
||||
|
||||
# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 7.2 - 7.1 - 7.0 - 5.6
|
||||
@ -73,14 +76,18 @@ DOCKER_SYNC_STRATEGY=native_osx
|
||||
WORKSPACE_COMPOSER_GLOBAL_INSTALL=true
|
||||
WORKSPACE_COMPOSER_REPO_PACKAGIST=
|
||||
WORKSPACE_INSTALL_NODE=true
|
||||
WORKSPACE_NODE_VERSION=stable
|
||||
WORKSPACE_NODE_VERSION=node
|
||||
WORKSPACE_NPM_REGISTRY=
|
||||
WORKSPACE_INSTALL_YARN=true
|
||||
WORKSPACE_YARN_VERSION=latest
|
||||
WORKSPACE_INSTALL_NPM_GULP=true
|
||||
WORKSPACE_INSTALL_NPM_BOWER=true
|
||||
WORKSPACE_INSTALL_NPM_VUE_CLI=true
|
||||
WORKSPACE_INSTALL_PHPREDIS=true
|
||||
WORKSPACE_INSTALL_WORKSPACE_SSH=false
|
||||
WORKSPACE_INSTALL_SUBVERSION=false
|
||||
WORKSPACE_INSTALL_XDEBUG=false
|
||||
WORKSPACE_INSTALL_PHPDBG=false
|
||||
WORKSPACE_INSTALL_LDAP=false
|
||||
WORKSPACE_INSTALL_SOAP=false
|
||||
WORKSPACE_INSTALL_IMAP=false
|
||||
@ -106,6 +113,7 @@ WORKSPACE_INSTALL_TERRAFORM=false
|
||||
WORKSPACE_INSTALL_DUSK_DEPS=false
|
||||
WORKSPACE_INSTALL_PG_CLIENT=false
|
||||
WORKSPACE_INSTALL_SWOOLE=false
|
||||
WORKSPACE_INSTALL_LIBPNG=false
|
||||
WORKSPACE_PUID=1000
|
||||
WORKSPACE_PGID=1000
|
||||
WORKSPACE_CHROME_DRIVER_VERSION=2.32
|
||||
@ -125,6 +133,7 @@ PHP_FPM_INSTALL_IMAGE_OPTIMIZERS=true
|
||||
PHP_FPM_INSTALL_PHPREDIS=true
|
||||
PHP_FPM_INSTALL_MEMCACHED=false
|
||||
PHP_FPM_INSTALL_XDEBUG=false
|
||||
PHP_FPM_INSTALL_PHPDBG=false
|
||||
PHP_FPM_INSTALL_IMAP=false
|
||||
PHP_FPM_INSTALL_MONGO=false
|
||||
PHP_FPM_INSTALL_AMQP=false
|
||||
@ -208,6 +217,7 @@ POSTGRES_DB=default
|
||||
POSTGRES_USER=default
|
||||
POSTGRES_PASSWORD=secret
|
||||
POSTGRES_PORT=5432
|
||||
POSTGRES_ENTRYPOINT_INITDB=./postgres/docker-entrypoint-initdb.d
|
||||
|
||||
### RABBITMQ ##############################################
|
||||
|
||||
@ -349,3 +359,6 @@ LARAVEL_ECHO_SERVER_PORT=6001
|
||||
SOLR_VERSION=5.5
|
||||
SOLR_PORT=8983
|
||||
SOLR_DATAIMPORTHANDLER_MYSQL=false
|
||||
|
||||
### NETDATA ###############################################
|
||||
NETDATA_PORT=19999
|
||||
|
@ -93,7 +93,7 @@ docker run --name myjenkins -p 8080:8080 -p 50000:50000 --env JAVA_OPTS="-Djava.
|
||||
```
|
||||
|
||||
# Configuring reverse proxy
|
||||
If you want to install Jenkins behind a reverse proxy with prefix, example: mysite.com/jenkins, you need to add environnement variable `JENKINS_OPTS="--prefix=/jenkins"` and then follow the below procedures to configure your reverse proxy, which will depend if you have Apache ou Nginx:
|
||||
If you want to install Jenkins behind a reverse proxy with prefix, example: mysite.com/jenkins, you need to add environment variable `JENKINS_OPTS="--prefix=/jenkins"` and then follow the below procedures to configure your reverse proxy, which will depend if you have Apache ou Nginx:
|
||||
- [Apache](https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Apache)
|
||||
- [Nginx](https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy)
|
||||
|
||||
@ -154,7 +154,7 @@ COPY custom.groovy /usr/share/jenkins/ref/init.groovy.d/custom.groovy
|
||||
## Preinstalling plugins
|
||||
|
||||
You can rely on the `install-plugins.sh` script to pass a set of plugins to download with their dependencies.
|
||||
Use plugin artifact ID, whithout `-plugin` extension, and append the version if needed separated by `:`.
|
||||
Use plugin artifact ID, without `-plugin` extension, and append the version if needed separated by `:`.
|
||||
Dependencies that are already included in the Jenkins war will only be downloaded if their required version is newer than the one included.
|
||||
|
||||
```
|
||||
|
@ -6,5 +6,5 @@
|
||||
[mysql]
|
||||
|
||||
[mysqld]
|
||||
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
|
||||
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
|
||||
character-set-server=utf8
|
||||
|
@ -18,8 +18,12 @@ FROM laradock/php-fpm:2.2-${PHP_VERSION}
|
||||
|
||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||
|
||||
# Set Environment Variables
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# always run apt update when start and after add new source list, then clean up at end.
|
||||
RUN apt-get update -yqq && \
|
||||
apt-get install -y apt-utils && \
|
||||
pecl channel-update pecl.php.net
|
||||
|
||||
#
|
||||
@ -101,6 +105,22 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Copy xdebug configuration for remote debugging
|
||||
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /usr/local/etc/php/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /usr/local/etc/php/conf.d/xdebug.ini
|
||||
|
||||
###########################################################################
|
||||
# Phpdbg:
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_PHPDBG=false
|
||||
ARG PHP_VERSION=${PHP_VERSION}
|
||||
|
||||
RUN if [ ${INSTALL_PHPDBG} = true ]; then \
|
||||
# Load the xdebug extension only with phpunit commands
|
||||
apt-get install -y --force-yes php${PHP_VERSION}-phpdbg \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Blackfire:
|
||||
###########################################################################
|
||||
@ -156,6 +176,10 @@ ARG INSTALL_MONGO=false
|
||||
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
pecl install mongo && \
|
||||
docker-php-ext-enable mongo \
|
||||
;fi && \
|
||||
pecl install mongodb && \
|
||||
docker-php-ext-enable mongodb \
|
||||
;fi
|
||||
@ -180,6 +204,8 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \
|
||||
ARG INSTALL_ZIP_ARCHIVE=false
|
||||
|
||||
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
|
||||
apt-get install libzip-dev -y && \
|
||||
docker-php-ext-configure zip --with-libzip && \
|
||||
# Install the zip extension
|
||||
docker-php-ext-install zip \
|
||||
;fi
|
||||
@ -189,7 +215,7 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_PCNTL=false
|
||||
RUN if [ ${INSTALL_PCNTL} = true]; then \
|
||||
RUN if [ ${INSTALL_PCNTL} = true ]; then \
|
||||
# Installs pcntl, helpful for running Horizon
|
||||
docker-php-ext-install pcntl \
|
||||
;fi
|
||||
@ -413,7 +439,7 @@ USER root
|
||||
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
||||
|
||||
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle \
|
||||
apt-get install -y jpegoptim optipng pngquant gifsicle \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
|
1
postgres/docker-entrypoint-initdb.d/.gitignore
vendored
Normal file
1
postgres/docker-entrypoint-initdb.d/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.sh
|
34
postgres/docker-entrypoint-initdb.d/createdb.sh.example
Normal file
34
postgres/docker-entrypoint-initdb.d/createdb.sh.example
Normal file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copy createdb.sh.example to createdb.sh
|
||||
# then uncomment then set database name and username to create you need databases
|
||||
#
|
||||
# example: .env POSTGRES_USER=appuser and need db name is myshop_db
|
||||
#
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER myuser WITH PASSWORD 'mypassword';
|
||||
# CREATE DATABASE myshop_db;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE myshop_db TO myuser;
|
||||
# EOSQL
|
||||
#
|
||||
# this sh script will auto run when the postgres container starts and the $DATA_PATH_HOST/postgres not found.
|
||||
#
|
||||
|
||||
set -e
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db1 WITH PASSWORD 'db1';
|
||||
# CREATE DATABASE db1;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db1 TO db1;
|
||||
# EOSQL
|
||||
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db2 WITH PASSWORD 'db2';
|
||||
# CREATE DATABASE db2;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db2 TO db2;
|
||||
# EOSQL
|
||||
|
||||
# psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
|
||||
# CREATE USER db3 WITH PASSWORD 'db3';
|
||||
# CREATE DATABASE db3;
|
||||
# GRANT ALL PRIVILEGES ON DATABASE db3 TO db3;
|
||||
# EOSQL
|
@ -18,6 +18,9 @@ FROM laradock/workspace:2.2-${PHP_VERSION}
|
||||
|
||||
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
|
||||
|
||||
# Set Environment Variables
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
|
||||
# Start as root
|
||||
USER root
|
||||
|
||||
@ -230,7 +233,7 @@ ARG PHP_VERSION=${PHP_VERSION}
|
||||
|
||||
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# Load the xdebug extension only with phpunit commands
|
||||
apt-get install -y --force-yes php${PHP_VERSION}-xdebug && \
|
||||
apt-get install -y php${PHP_VERSION}-xdebug && \
|
||||
sed -i 's/^;//g' /etc/php/${PHP_VERSION}/cli/conf.d/20-xdebug.ini && \
|
||||
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
|
||||
;fi
|
||||
@ -238,6 +241,24 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
|
||||
# ADD for REMOTE debugging
|
||||
COPY ./xdebug.ini /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini
|
||||
|
||||
RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.remote_enable=0/xdebug.remote_enable=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini && \
|
||||
sed -i "s/xdebug.cli_color=0/xdebug.cli_color=1/" /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini
|
||||
|
||||
###########################################################################
|
||||
# Phpdbg:
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
ARG INSTALL_PHPDBG=false
|
||||
ARG PHP_VERSION=${PHP_VERSION}
|
||||
|
||||
RUN if [ ${INSTALL_PHPDBG} = true ]; then \
|
||||
# Load the xdebug extension only with phpunit commands
|
||||
apt-get install -y --force-yes php${PHP_VERSION}-phpdbg \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Blackfire:
|
||||
###########################################################################
|
||||
@ -285,7 +306,12 @@ ARG PHP_VERSION=${PHP_VERSION}
|
||||
|
||||
RUN if [ ${INSTALL_MONGO} = true ]; then \
|
||||
# Install the mongodb extension
|
||||
pecl -q install mongodb && \
|
||||
if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \
|
||||
pecl install mongo && \
|
||||
echo "extension=mongo.so" >> /etc/php/${PHP_VERSION}/mods-available/mongo.ini && \
|
||||
ln -s /etc/php/${PHP_VERSION}/mods-available/mongo.ini /etc/php/${PHP_VERSION}/cli/conf.d/30-mongo.ini \
|
||||
;fi && \
|
||||
pecl install mongodb && \
|
||||
echo "extension=mongodb.so" >> /etc/php/${PHP_VERSION}/mods-available/mongodb.ini && \
|
||||
ln -s /etc/php/${PHP_VERSION}/mods-available/mongodb.ini /etc/php/${PHP_VERSION}/cli/conf.d/30-mongodb.ini \
|
||||
;fi
|
||||
@ -340,6 +366,17 @@ RUN if [ ${INSTALL_SWOOLE} = true ]; then \
|
||||
ln -s /etc/php/${PHP_VERSION}/mods-available/swoole.ini /etc/php/${PHP_VERSION}/cli/conf.d/20-swoole.ini \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Libpng16 EXTENSION
|
||||
###########################################################################
|
||||
|
||||
ARG INSTALL_LIBPNG=false
|
||||
|
||||
RUN if [ ${INSTALL_LIBPNG} = true ]; then \
|
||||
apt update && \
|
||||
apt install libpng16-16 \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# Drupal Console:
|
||||
###########################################################################
|
||||
@ -362,24 +399,35 @@ USER laradock
|
||||
###########################################################################
|
||||
|
||||
# Check if NVM needs to be installed
|
||||
ARG NODE_VERSION=stable
|
||||
ARG NODE_VERSION=node
|
||||
ENV NODE_VERSION ${NODE_VERSION}
|
||||
ARG INSTALL_NODE=false
|
||||
ARG INSTALL_NPM_GULP=false
|
||||
ARG INSTALL_NPM_BOWER=false
|
||||
ARG INSTALL_NPM_VUE_CLI=false
|
||||
ARG NPM_REGISTRY
|
||||
ENV NPM_REGISTRY ${NPM_REGISTRY}
|
||||
ENV NVM_DIR /home/laradock/.nvm
|
||||
|
||||
RUN if [ ${INSTALL_NODE} = true ]; then \
|
||||
# Install nvm (A Node Version Manager)
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash && \
|
||||
. $NVM_DIR/nvm.sh && \
|
||||
nvm install ${NODE_VERSION} && \
|
||||
nvm use ${NODE_VERSION} && \
|
||||
nvm alias ${NODE_VERSION} && \
|
||||
if [ ${NPM_REGISTRY} ]; then \
|
||||
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash \
|
||||
&& . $NVM_DIR/nvm.sh \
|
||||
&& nvm install ${NODE_VERSION} \
|
||||
&& nvm use ${NODE_VERSION} \
|
||||
&& nvm alias ${NODE_VERSION} \
|
||||
&& if [ ${NPM_REGISTRY} ]; then \
|
||||
npm config set registry ${NPM_REGISTRY} \
|
||||
;fi && \
|
||||
npm install -g gulp bower vue-cli \
|
||||
;fi \
|
||||
&& if [ ${INSTALL_NPM_GULP} = true ]; then \
|
||||
npm install -g gulp \
|
||||
;fi \
|
||||
&& if [ ${INSTALL_NPM_BOWER} = true ]; then \
|
||||
npm install -g bower \
|
||||
;fi \
|
||||
&& if [ ${INSTALL_NPM_VUE_CLI} = true ]; then \
|
||||
npm install -g @vue/cli \
|
||||
;fi \
|
||||
;fi
|
||||
|
||||
# Wouldn't execute when added to the RUN statement in the above block
|
||||
@ -641,9 +689,9 @@ USER root
|
||||
ARG INSTALL_IMAGE_OPTIMIZERS=false
|
||||
|
||||
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
|
||||
apt-get install -y --force-yes jpegoptim optipng pngquant gifsicle && \
|
||||
apt-get install -y jpegoptim optipng pngquant gifsicle && \
|
||||
if [ ${INSTALL_NODE} = true ]; then \
|
||||
. ~/.bashrc && npm install -g svgo \
|
||||
exec bash && . ~/.bashrc && npm install -g svgo \
|
||||
;fi\
|
||||
;fi
|
||||
|
||||
@ -690,7 +738,7 @@ USER root
|
||||
ARG INSTALL_IMAGEMAGICK=false
|
||||
|
||||
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
|
||||
apt-get install -y --force-yes imagemagick php-imagick \
|
||||
apt-get install -y imagemagick php-imagick \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
@ -721,6 +769,15 @@ RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
|
||||
apt-get -y install postgresql-client \
|
||||
;fi
|
||||
|
||||
###########################################################################
|
||||
# nasm
|
||||
###########################################################################
|
||||
|
||||
USER root
|
||||
|
||||
RUN apt-get update -yqq \
|
||||
&& apt-get -yqq install nasm
|
||||
|
||||
###########################################################################
|
||||
# Dusk Dependencies:
|
||||
###########################################################################
|
||||
|
Reference in New Issue
Block a user