Compare commits

..

26 Commits

Author SHA1 Message Date
0cbc51bf72 php-fpm ini file rename to match volume config format. (#1646)
volumes:
  - ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
2018-06-25 23:03:23 +08:00
08dfc9f816 php-fpm, workspace when php5 support old mongo ext. (#1642) 2018-06-25 20:16:25 +08:00
b71f50bf83 Fix apt-get deprecated --force-yes flag & noninteractive if needed (#1640) 2018-06-24 23:19:49 +08:00
7d1dc66f77 Conditionally install npm tools (#1641) 2018-06-24 23:19:09 +08:00
f3c934222f Fix #1627, The POSTGRES_ENTRYPOINT_INITDB variable is not set. Defaulting to a blank string. (#1639) 2018-06-24 14:38:04 +08:00
a90865d67c Update nvm install instructions (#1638) 2018-06-24 10:02:21 +08:00
a0a5c85a54 Update deployer install instructions (#1637) 2018-06-24 10:01:58 +08:00
a807caa30a Update laravel envoy install instructions (#1636) 2018-06-24 10:01:30 +08:00
bc27e96337 Update aerospike installation instructions (#1635) 2018-06-24 10:00:52 +08:00
11912055ec Update global composer install instructions (#1634) 2018-06-24 10:00:19 +08:00
3509473b89 Update node & yarn install instructions (#1633) 2018-06-24 09:59:15 +08:00
5521f71428 Update mongo install instructions (#1632) 2018-06-24 09:48:20 +08:00
339d47f303 Update linuxbrew install instructions (#1631) 2018-06-24 09:47:13 +08:00
600a6154b4 Automate xdebug installation and simplify instructions (#1630) 2018-06-24 09:46:12 +08:00
4673ba7b31 Fix minor typos and clarify few documentation phrases (#1629) 2018-06-24 09:43:54 +08:00
154249a08f Merge pull request #1614 from ahkui/postgresql_init_db
add postgres init db
2018-06-22 19:41:58 +08:00
5bffd43b55 Merge pull request #1505 from Crease29/patch-1
Add COMPOSE_PROJECT_NAME to env-example
2018-06-22 19:34:33 +08:00
0e9d044c6f Merge pull request #1606 from ahkui/fix_workspace_no_nasm
fix #1607  workspace no nasm
2018-06-22 18:30:49 +08:00
7199ae5a34 fix wrong example 2018-06-15 23:37:27 +08:00
6caa4c5fb9 fix wrong sql 2018-06-15 23:27:28 +08:00
75b3fa499e no message 2018-06-15 15:30:45 +08:00
999118b674 update example 2018-06-15 15:27:37 +08:00
4b2c440146 add init database 2018-06-15 04:39:19 +08:00
65444d39b6 fix workspace no nasm 2018-06-12 20:15:30 +08:00
ad1509dd62 Update docuumentation for COMPOSE_PROJECT_NAME 2018-04-25 08:38:43 +02:00
9ab84c5174 Add COMPOSE_PROJECT_NAME to env-example 2018-04-25 08:30:33 +02:00
14 changed files with 188 additions and 174 deletions

View File

@ -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. * 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. * 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.. * 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. **Note:** Laradock has two base images for (`Workspace` and `php-fpm`, mainly made to speed up the build time on your machine.

View File

@ -201,7 +201,7 @@ More [options](https://docs.docker.com/compose/reference/logs/)
<a name="Install-PHP-Extensions"></a> <a name="Install-PHP-Extensions"></a>
## Install PHP Extensions ## 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)*. The PHP-FPM extensions should be installed in `php-fpm/Dockerfile-XX`. *(replace XX with your default PHP version number)*.
<br> <br>
@ -277,44 +277,17 @@ docker-compose build workspace
1 - First install `xDebug` in the Workspace and the PHP-FPM Containers: 1 - First install `xDebug` in the Workspace and the PHP-FPM Containers:
<br> <br>
a) open the `docker-compose.yml` file a) open the `.env` file
<br> <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> <br>
c) set it to `true` c) set it to `true`
<br> <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> <br>
e) set it to `true` e) set it to `true`
It should be like this: 2 - Re-build the containers `docker-compose build workspace php-fpm`
```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`
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. 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.
@ -358,24 +331,13 @@ Note: If `.php-fpm/xdebug` doesn't execute and gives `Permission Denied` error t
<a name="Install-Deployer"></a> <a name="Install-Deployer"></a>
## Install Deployer (Deployment tool for PHP) ## Install Deployer (Deployment tool for PHP)
1 - Open the `docker-compose.yml` file 1 - Open the `.env` file
<br> <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> <br>
3 - Set it to `true` 3 - Set it to `true`
<br> <br>
It should be like this:
```yml
workspace:
build:
context: ./workspace
args:
- INSTALL_DEPLOYER=true
...
```
4 - Re-build the containers `docker-compose build workspace` 4 - Re-build the containers `docker-compose build workspace`
[**Deployer Documentation Here**](https://deployer.org/docs) [**Deployer Documentation Here**](https://deployer.org/docs)
@ -428,7 +390,7 @@ To learn more about how Docker publishes ports, please read [this excellent post
1) Boot the container `docker-compose up -d jenkins`. To enter the container type `docker-compose exec jenkins bash`. 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) 2) Go to `http://localhost:8090/` (if you didn't change your default port mapping)
3) Authenticate from the web app. 3) Authenticate from the web app.
@ -631,33 +593,16 @@ composer require predis/predis:^1.0
1 - First install `mongo` in the Workspace and the PHP-FPM Containers: 1 - First install `mongo` in the Workspace and the PHP-FPM Containers:
<br> <br>
a) open the `docker-compose.yml` file a) open the `.env` file
<br> <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> <br>
c) set it to `true` c) set it to `true`
<br> <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> <br>
e) set it to `true` 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` 2 - Re-build the containers `docker-compose build workspace php-fpm`
@ -971,7 +916,7 @@ docker-compose up -d aws
3 - Access the aws container with `docker-compose exec aws bash` 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 +934,7 @@ docker-compose up -d grafana
3 - Open your browser and visit the localhost on port **3000** at the following URL: `http://localhost:3000` 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.
@ -1228,20 +1173,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. 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` 3 - Now add your dependencies to `workspace/composer.json`
4 - Re-build the Workspace Container `docker-compose build workspace` 4 - Re-build the Workspace Container `docker-compose build workspace`
@ -1280,20 +1215,9 @@ c - Re-build the Workspace Container `docker-compose build workspace`
To install NVM and NodeJS in the Workspace container 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` 2 - Search for the `WORKSPACE_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
...
```
3 - Re-build the container `docker-compose build workspace` 3 - Re-build the container `docker-compose build workspace`
@ -1308,21 +1232,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: 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 <br>
- INSTALL_YARN=true <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` 3 - Re-build the container `docker-compose build workspace`
@ -1337,20 +1301,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: 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` 2 - Search for the `WORKSPACE_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
...
```
3 - Re-build the container `docker-compose build workspace` 3 - Re-build the container `docker-compose build workspace`
@ -1376,32 +1329,16 @@ You are free to modify the `aliases.sh` as you see fit, adding your own aliases
1 - First install `aerospike` in the Workspace and the PHP-FPM Containers: 1 - First install `aerospike` in the Workspace and the PHP-FPM Containers:
<br> <br>
a) open the `docker-compose.yml` file a) open the `.env` file
<br> <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> <br>
c) set it to `true` c) set it to `true`
<br> <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> <br>
e) set it to `true` e) set it to `true`
<br>
It should be like this:
```yml
workspace:
build:
context: ./workspace
args:
- INSTALL_AEROSPIKE=true
...
php-fpm:
build:
context: ./php-fpm
args:
- INSTALL_AEROSPIKE=true
...
```
2 - Re-build the containers `docker-compose build workspace php-fpm` 2 - Re-build the containers `docker-compose build workspace php-fpm`
@ -1414,24 +1351,13 @@ It should be like this:
<a name="Install-Laravel-Envoy"></a> <a name="Install-Laravel-Envoy"></a>
## Install Laravel Envoy (Envoy Task Runner) ## Install Laravel Envoy (Envoy Task Runner)
1 - Open the `docker-compose.yml` file 1 - Open the `.env` file
<br> <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> <br>
3 - Set it to `true` 3 - Set it to `true`
<br> <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` 4 - Re-build the containers `docker-compose build workspace`
[**Laravel Envoy Documentation Here**](https://laravel.com/docs/5.3/envoy) [**Laravel Envoy Documentation Here**](https://laravel.com/docs/5.3/envoy)
@ -1525,7 +1451,7 @@ Quick Setup giude, (we recommend you check their docs)
<a name="Docker-Sync"></a> <a name="Docker-Sync"></a>
### Workaround B: using d4m-nfs ### 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 ### B.1: using the built in d4m-nfs integration
@ -1630,7 +1556,7 @@ Click on the Docker Icon > Preferences > (remove everything form the list except
git clone https://github.com/IFSight/d4m-nfs ~/d4m-nfs 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 ```txt
/Users:/Users /Users:/Users

View File

@ -161,11 +161,13 @@ We recommend using a Docker version which is newer than 1.13.
cp env-example .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 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 `;`. 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: 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 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). 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)* *You can change the PUID (User id) and PGID (group id) variables from the `.env` file)*
<br> <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`: Open your PHP project's `.env` file or whichever configuration file you are reading from, and set the database host `DB_HOST` to `mysql`:

View File

@ -61,6 +61,9 @@ services:
- INSTALL_NODE=${WORKSPACE_INSTALL_NODE} - INSTALL_NODE=${WORKSPACE_INSTALL_NODE}
- NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY} - NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY}
- INSTALL_YARN=${WORKSPACE_INSTALL_YARN} - 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_DRUSH=${WORKSPACE_INSTALL_DRUSH}
- INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE} - INSTALL_DRUPAL_CONSOLE=${WORKSPACE_INSTALL_DRUPAL_CONSOLE}
- INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE} - INSTALL_AEROSPIKE=${WORKSPACE_INSTALL_AEROSPIKE}
@ -322,6 +325,7 @@ services:
build: ./postgres build: ./postgres
volumes: volumes:
- ${DATA_PATH_HOST}/postgres:/var/lib/postgresql/data - ${DATA_PATH_HOST}/postgres:/var/lib/postgresql/data
- ${POSTGRES_ENTRYPOINT_INITDB}:/docker-entrypoint-initdb.d
ports: ports:
- "${POSTGRES_PORT}:5432" - "${POSTGRES_PORT}:5432"
environment: environment:

View File

@ -29,6 +29,9 @@ COMPOSE_FILE=docker-compose.yml
# Change the separator from : to ; on Windows # Change the separator from : to ; on Windows
COMPOSE_PATH_SEPARATOR=: 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 ########################################### ### 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 # 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
@ -77,6 +80,9 @@ WORKSPACE_NODE_VERSION=stable
WORKSPACE_NPM_REGISTRY= WORKSPACE_NPM_REGISTRY=
WORKSPACE_INSTALL_YARN=true WORKSPACE_INSTALL_YARN=true
WORKSPACE_YARN_VERSION=latest 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_PHPREDIS=true
WORKSPACE_INSTALL_WORKSPACE_SSH=false WORKSPACE_INSTALL_WORKSPACE_SSH=false
WORKSPACE_INSTALL_SUBVERSION=false WORKSPACE_INSTALL_SUBVERSION=false
@ -208,6 +214,7 @@ POSTGRES_DB=default
POSTGRES_USER=default POSTGRES_USER=default
POSTGRES_PASSWORD=secret POSTGRES_PASSWORD=secret
POSTGRES_PORT=5432 POSTGRES_PORT=5432
POSTGRES_ENTRYPOINT_INITDB=./postgres/docker-entrypoint-initdb.d
### RABBITMQ ############################################## ### RABBITMQ ##############################################

View File

@ -93,7 +93,7 @@ docker run --name myjenkins -p 8080:8080 -p 50000:50000 --env JAVA_OPTS="-Djava.
``` ```
# Configuring reverse proxy # 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) - [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) - [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 ## Preinstalling plugins
You can rely on the `install-plugins.sh` script to pass a set of plugins to download with their dependencies. 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. Dependencies that are already included in the Jenkins war will only be downloaded if their required version is newer than the one included.
``` ```

View File

@ -101,6 +101,10 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Copy xdebug configuration for remote debugging # Copy xdebug configuration for remote debugging
COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini 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
########################################################################### ###########################################################################
# Blackfire: # Blackfire:
########################################################################### ###########################################################################
@ -156,6 +160,10 @@ ARG INSTALL_MONGO=false
RUN if [ ${INSTALL_MONGO} = true ]; then \ RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension # 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 && \ pecl install mongodb && \
docker-php-ext-enable mongodb \ docker-php-ext-enable mongodb \
;fi ;fi
@ -413,7 +421,7 @@ USER root
ARG INSTALL_IMAGE_OPTIMIZERS=false ARG INSTALL_IMAGE_OPTIMIZERS=false
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \ 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 ;fi
########################################################################### ###########################################################################

View File

@ -0,0 +1 @@
*.sh

View 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

View File

@ -18,6 +18,9 @@ FROM laradock/workspace:2.2-${PHP_VERSION}
LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>" LABEL maintainer="Mahmoud Zalt <mahmoud@zalt.me>"
# Set Environment Variables
ENV DEBIAN_FRONTEND noninteractive
# Start as root # Start as root
USER root USER root
@ -230,7 +233,7 @@ ARG PHP_VERSION=${PHP_VERSION}
RUN if [ ${INSTALL_XDEBUG} = true ]; then \ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Load the xdebug extension only with phpunit commands # 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 && \ 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 \ echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
;fi ;fi
@ -238,6 +241,10 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# ADD for REMOTE debugging # ADD for REMOTE debugging
COPY ./xdebug.ini /etc/php/${PHP_VERSION}/cli/conf.d/xdebug.ini 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
########################################################################### ###########################################################################
# Blackfire: # Blackfire:
########################################################################### ###########################################################################
@ -285,7 +292,12 @@ ARG PHP_VERSION=${PHP_VERSION}
RUN if [ ${INSTALL_MONGO} = true ]; then \ RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension # 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 && \ 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 \ ln -s /etc/php/${PHP_VERSION}/mods-available/mongodb.ini /etc/php/${PHP_VERSION}/cli/conf.d/30-mongodb.ini \
;fi ;fi
@ -365,21 +377,32 @@ USER laradock
ARG NODE_VERSION=stable ARG NODE_VERSION=stable
ENV NODE_VERSION ${NODE_VERSION} ENV NODE_VERSION ${NODE_VERSION}
ARG INSTALL_NODE=false ARG INSTALL_NODE=false
ARG INSTALL_NPM_GULP=false
ARG INSTALL_NPM_BOWER=false
ARG INSTALL_NPM_VUE_CLI=false
ARG NPM_REGISTRY ARG NPM_REGISTRY
ENV NPM_REGISTRY ${NPM_REGISTRY} ENV NPM_REGISTRY ${NPM_REGISTRY}
ENV NVM_DIR /home/laradock/.nvm ENV NVM_DIR /home/laradock/.nvm
RUN if [ ${INSTALL_NODE} = true ]; then \ RUN if [ ${INSTALL_NODE} = true ]; then \
# Install nvm (A Node Version Manager) # Install nvm (A Node Version Manager)
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash && \ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash \
. $NVM_DIR/nvm.sh && \ && . $NVM_DIR/nvm.sh \
nvm install ${NODE_VERSION} && \ && nvm install ${NODE_VERSION} \
nvm use ${NODE_VERSION} && \ && nvm use ${NODE_VERSION} \
nvm alias ${NODE_VERSION} && \ && nvm alias ${NODE_VERSION} \
if [ ${NPM_REGISTRY} ]; then \ && if [ ${NPM_REGISTRY} ]; then \
npm config set registry ${NPM_REGISTRY} \ npm config set registry ${NPM_REGISTRY} \
;fi && \ ;fi \
npm install -g gulp bower vue-cli \ && 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 ;fi
# Wouldn't execute when added to the RUN statement in the above block # Wouldn't execute when added to the RUN statement in the above block
@ -641,7 +664,7 @@ USER root
ARG INSTALL_IMAGE_OPTIMIZERS=false ARG INSTALL_IMAGE_OPTIMIZERS=false
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \ 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 \ if [ ${INSTALL_NODE} = true ]; then \
. ~/.bashrc && npm install -g svgo \ . ~/.bashrc && npm install -g svgo \
;fi\ ;fi\
@ -690,7 +713,7 @@ USER root
ARG INSTALL_IMAGEMAGICK=false ARG INSTALL_IMAGEMAGICK=false
RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \ RUN if [ ${INSTALL_IMAGEMAGICK} = true ]; then \
apt-get install -y --force-yes imagemagick php-imagick \ apt-get install -y imagemagick php-imagick \
;fi ;fi
########################################################################### ###########################################################################
@ -721,6 +744,15 @@ RUN if [ ${INSTALL_PG_CLIENT} = true ]; then \
apt-get -y install postgresql-client \ apt-get -y install postgresql-client \
;fi ;fi
###########################################################################
# nasm
###########################################################################
USER root
RUN apt-get update -yqq \
&& apt-get -yqq install nasm
########################################################################### ###########################################################################
# Dusk Dependencies: # Dusk Dependencies:
########################################################################### ###########################################################################