Compare commits

...

13 Commits

Author SHA1 Message Date
2ec23122e7 Update version pointer node (#1598) 2018-06-30 17:08:02 +08:00
a1e01ac19b Install phpdbg (#1612)
* Install phpdbg
* Change documentstion
2018-06-30 16:54:46 +08:00
eccc149f45 Fix current shell on root when installing svgo (#1644)
This fix the following errors:
/bin/sh: 13: /root/.bashrc: shopt: not found
/bin/sh: 21: /root/.bashrc: shopt: not found
/bin/sh: 103: /root/.bashrc: source: not found
2018-06-30 16:50:37 +08:00
9cb7624da7 bugfix: add 'networks' to 'docker-in-docker' (#1660)
I do not know why but the pull request https://github.com/laradock/laradock/pull/1655 has lost the 'networks' code. I'll try to insert it Insert again ;-)
2018-06-30 16:49:29 +08:00
cd1c56c1e2 Fix Laradock-Toolbox url (#1610) 2018-06-28 13:29:30 +08:00
9d42ea6b9d Update docker-compose.yml to add 'dind' (#1655)
Add 'dind' image to run docker-in-docker: issue https://github.com/laradock/laradock/issues/1653
2018-06-28 13:25:33 +08:00
b0bfa5f1d3 Add netdata for monitoring server (#1613)
* add netdata container
* update document
* update document each part separate with 6 * \n
* remove unuse file
2018-06-28 13:24:08 +08:00
dcf6b6d9ac Install of libpng16 library for fix react and react with material-ui application (#1625)
* Added commands in Workspace Dockerfile for installation of libpng with configurable env argument switch

* Updated documentation
2018-06-28 13:14:06 +08:00
1d9cbd7c75 fix: MySQL 8.0 removed NO_AUTO_CREATE_USER SQL mode, fixed #1492 (#1548) 2018-06-27 18:49:53 +08:00
fd56c4dcda Update VUE CLI to v3 (#1654) 2018-06-27 18:48:32 +08:00
0351cf531b Fix minor syntax issue that solves "[/bin/sh: 1: [: missing ]" error (#1649) 2018-06-27 18:47:42 +08:00
09e998b723 Fix missing apt-utils package (#1652) 2018-06-27 18:47:05 +08:00
06d0105514 Fix PHP zip extension installation warnings (#1648)
This fixes the following warnings when installing "zip" php extension:
configure: WARNING: ========================================================
configure: WARNING: Use of bundled libzip is deprecated and will be removed.
configure: WARNING: Some features such as encryption and bzip2 are not available.
configure: WARNING: Use system library and --with-libzip is recommended.
configure: WARNING: ========================================================
2018-06-27 18:46:27 +08:00
8 changed files with 238 additions and 54 deletions

View File

@ -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>
@ -243,6 +245,8 @@ docker-compose build php-fpm
<br>
<a name="Change-the-PHP-CLI-Version"></a>
## Change the PHP-CLI Version
@ -271,6 +275,8 @@ docker-compose build workspace
<br>
<a name="Install-xDebug"></a>
## Install xDebug
@ -291,6 +297,28 @@ e) set it to `true`
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
@ -346,6 +374,7 @@ Note: If `.php-fpm/xdebug` doesn't execute and gives `Permission Denied` error t
<br>
<a name="Production"></a>
@ -384,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 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.
<br>
<a name="Laravel"></a>
<a name="Install-Laravel"></a>
## Install Laravel from a Docker Container
@ -532,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
@ -701,6 +756,8 @@ docker-compose up -d adminer
<br>
<a name="Use-Portainer"></a>
## Use Portainer
@ -717,6 +774,7 @@ docker-compose up -d portainer
<br>
<a name="Use-pgAdmin"></a>
## Use PgAdmin
@ -869,6 +927,10 @@ docker-compose up -d rethinkdb
- set the `DB_DATABASE` to `database`.
<br>
<a name="Use-Minio"></a>
## Use Minio
@ -901,6 +963,9 @@ docker-compose up -d minio
<br>
<a name="Use-AWS"></a>
## Use AWS
@ -920,6 +985,9 @@ docker-compose up -d aws
<br>
<a name="Use-Grafana"></a>
## Use Grafana
@ -938,6 +1006,9 @@ docker-compose up -d grafana
<br>
<a name="CodeIgniter"></a>
@ -959,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
@ -972,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
@ -1055,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
@ -1109,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)
@ -1123,6 +1210,8 @@ GRANT ALL ON `your_db_1`.* TO 'mysql_user'@'%' ;
<br>
<a name="Change-MySQL-port"></a>
## Change MySQL port
@ -1311,6 +1400,7 @@ Linuxbrew is a package manager for Linux. It is the Linux version of MacOS Homeb
<br>
<a name="Common-Aliases"></a>
<br>
@ -1323,6 +1413,7 @@ 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
@ -1367,7 +1458,6 @@ e) set it to `true`
<br>
<a name="phpstorm-debugging"></a>
## PHPStorm Debugging Guide
@ -1380,7 +1470,6 @@ Remote debug Laravel web and phpunit tests.
<br>
<a name="keep-tracking-Laradock"></a>
## Keep track of your Laradock changes
@ -1395,7 +1484,6 @@ Remote debug Laravel web and phpunit tests.
<br>
<a name="upgrading-laradock"></a>
## Upgrading Laradock
@ -1416,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
@ -1447,6 +1532,9 @@ Quick Setup giude, (we recommend you check their docs)
<br>
<a name="Docker-Sync"></a>
### Workaround B: using d4m-nfs
@ -1536,8 +1624,6 @@ Visit the [docker-sync documentation](https://github.com/EugenMayer/docker-sync/
<br>
### B.2: using the d4m-nfs tool
@ -1584,16 +1670,6 @@ docker-compose up ...
<br>
<a name="Common-Problems"></a>
## Common Problems
@ -1605,7 +1681,6 @@ docker-compose up ...
<br>
## I see a blank (white) page instead of the Laravel 'Welcome' page!
@ -1619,6 +1694,7 @@ sudo chmod -R 777 storage bootstrap/cache
<br>
## I see "Welcome to nginx" instead of the Laravel App!
@ -1628,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`
@ -1637,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.
@ -1649,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
@ -1659,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
@ -1683,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
```

View File

@ -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>

View File

@ -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.

View File

@ -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}
@ -86,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}
@ -115,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}
@ -149,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:
@ -714,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

View File

@ -76,7 +76,7 @@ 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
@ -87,6 +87,7 @@ 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
@ -112,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
@ -131,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
@ -356,3 +359,6 @@ LARAVEL_ECHO_SERVER_PORT=6001
SOLR_VERSION=5.5
SOLR_PORT=8983
SOLR_DATAIMPORTHANDLER_MYSQL=false
### NETDATA ###############################################
NETDATA_PORT=19999

View File

@ -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

View File

@ -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
#
@ -105,6 +109,18 @@ RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /usr/local/e
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:
###########################################################################
@ -188,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

View File

@ -245,6 +245,20 @@ RUN sed -i "s/xdebug.remote_autostart=0/xdebug.remote_autostart=1/" /etc/php/${P
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:
###########################################################################
@ -352,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:
###########################################################################
@ -374,7 +399,7 @@ 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
@ -401,7 +426,7 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
npm install -g bower \
;fi \
&& if [ ${INSTALL_NPM_VUE_CLI} = true ]; then \
npm install -g vue-cli \
npm install -g @vue/cli \
;fi \
;fi
@ -666,7 +691,7 @@ ARG INSTALL_IMAGE_OPTIMIZERS=false
RUN if [ ${INSTALL_IMAGE_OPTIMIZERS} = true ]; then \
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