From 3ad37405c6cd91304a0e286dcc2d75f8931beffa Mon Sep 17 00:00:00 2001 From: Pavel Date: Thu, 24 Jan 2019 20:25:08 +0300 Subject: [PATCH 01/24] Chmod --- mariadb/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mariadb/Dockerfile b/mariadb/Dockerfile index 0dcb9481..1929726a 100644 --- a/mariadb/Dockerfile +++ b/mariadb/Dockerfile @@ -4,6 +4,8 @@ LABEL maintainer="Mahmoud Zalt " COPY my.cnf /etc/mysql/conf.d/my.cnf +RUN chmod -R 644 /etc/mysql/conf.d/my.cnf + CMD ["mysqld"] EXPOSE 3306 From e9eacfafa7d2fe23bf23ff2aaaeb6adcd63027bd Mon Sep 17 00:00:00 2001 From: skipworkgh Date: Tue, 2 Jul 2019 16:11:58 +0200 Subject: [PATCH 02/24] Added support for the mailparse php pecl extension --- docker-compose.yml | 2 ++ env-example | 2 ++ php-fpm/Dockerfile | 13 +++++++++++++ workspace/Dockerfile | 10 ++++++++++ 4 files changed, 27 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index a136f741..4babebc3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -106,6 +106,7 @@ services: - INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT} - INSTALL_PING=${WORKSPACE_INSTALL_PING} - INSTALL_SSHPASS=${WORKSPACE_INSTALL_SSHPASS} + - INSTALL_MAILPARSE=${WORKSPACE_INSTALL_MAILPARSE} - PUID=${WORKSPACE_PUID} - PGID=${WORKSPACE_PGID} - CHROME_DRIVER_VERSION=${WORKSPACE_CHROME_DRIVER_VERSION} @@ -183,6 +184,7 @@ services: - INSTALL_MYSQL_CLIENT=${PHP_FPM_INSTALL_MYSQL_CLIENT} - INSTALL_PING=${PHP_FPM_INSTALL_PING} - INSTALL_SSHPASS=${PHP_FPM_INSTALL_SSHPASS} + - INSTALL_MAILPARSE=${PHP_FPM_INSTALL_MAILPARSE} - ADDITIONAL_LOCALES=${PHP_FPM_ADDITIONAL_LOCALES} - INSTALL_FFMPEG=${PHP_FPM_FFMPEG} - http_proxy diff --git a/env-example b/env-example index 8a754524..2e38d39f 100644 --- a/env-example +++ b/env-example @@ -137,6 +137,7 @@ WORKSPACE_INSTALL_PING=false WORKSPACE_INSTALL_SSHPASS=false WORKSPACE_INSTALL_INOTIFY=false WORKSPACE_INSTALL_FSWATCH=false +WORKSPACE_INSTALL_MAILPARSE=true WORKSPACE_PUID=1000 WORKSPACE_PGID=1000 WORKSPACE_CHROME_DRIVER_VERSION=2.42 @@ -188,6 +189,7 @@ PHP_FPM_INSTALL_ADDITIONAL_LOCALES=false PHP_FPM_INSTALL_MYSQL_CLIENT=false PHP_FPM_INSTALL_PING=false PHP_FPM_INSTALL_SSHPASS=false +PHP_FPM_INSTALL_MAILPARSE=true PHP_FPM_FFMPEG=false PHP_FPM_ADDITIONAL_LOCALES="es_ES.UTF-8 fr_FR.UTF-8" diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index ab6ba6b0..bc7112a4 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -725,6 +725,19 @@ RUN if [ ${INSTALL_FFMPEG} = true ]; then \ apt-get -y install ffmpeg \ ;fi +########################################################################### +# Mailparse extension: +########################################################################### + +ARG INSTALL_MAILPARSE=false + +RUN if [ ${INSTALL_MAILPARSE} = true ]; then \ + # Install mailparse extension + printf "\n" | pecl install -o -f mailparse \ + && rm -rf /tmp/pear \ + && docker-php-ext-enable mailparse \ +;fi + ########################################################################### # Check PHP version: ########################################################################### diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 3a07eee2..32d2c24c 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -1057,6 +1057,16 @@ RUN if [ ${INSTALL_FFMPEG} = true ]; then \ apt-get -y install ffmpeg \ ;fi +########################################################################### +# Mailparse extension: +########################################################################### + +ARG INSTALL_MAILPARSE=false + +RUN if [ ${INSTALL_MAILPARSE} = true ]; then \ + apt-get install -yqq php-mailparse \ +;fi + ########################################################################### # GNU Parallel: ########################################################################### From 9a0f9cfa74876b0bcda19561e270c63a360cd810 Mon Sep 17 00:00:00 2001 From: skipworkgh Date: Tue, 2 Jul 2019 16:36:08 +0200 Subject: [PATCH 03/24] Lets not enable them by default... --- env-example | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/env-example b/env-example index 2e38d39f..f0fa3297 100644 --- a/env-example +++ b/env-example @@ -137,7 +137,7 @@ WORKSPACE_INSTALL_PING=false WORKSPACE_INSTALL_SSHPASS=false WORKSPACE_INSTALL_INOTIFY=false WORKSPACE_INSTALL_FSWATCH=false -WORKSPACE_INSTALL_MAILPARSE=true +WORKSPACE_INSTALL_MAILPARSE=false WORKSPACE_PUID=1000 WORKSPACE_PGID=1000 WORKSPACE_CHROME_DRIVER_VERSION=2.42 @@ -189,7 +189,7 @@ PHP_FPM_INSTALL_ADDITIONAL_LOCALES=false PHP_FPM_INSTALL_MYSQL_CLIENT=false PHP_FPM_INSTALL_PING=false PHP_FPM_INSTALL_SSHPASS=false -PHP_FPM_INSTALL_MAILPARSE=true +PHP_FPM_INSTALL_MAILPARSE=false PHP_FPM_FFMPEG=false PHP_FPM_ADDITIONAL_LOCALES="es_ES.UTF-8 fr_FR.UTF-8" From 63a5c45bf86a037d16b31b024108ec96856b537a Mon Sep 17 00:00:00 2001 From: Hany alsamman Date: Tue, 23 Jul 2019 07:08:56 +0300 Subject: [PATCH 04/24] Add PCNTL option to php-fpm --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 69b5dc69..9e6bce9c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -183,6 +183,7 @@ services: - INSTALL_MYSQL_CLIENT=${PHP_FPM_INSTALL_MYSQL_CLIENT} - INSTALL_PING=${PHP_FPM_INSTALL_PING} - INSTALL_SSHPASS=${PHP_FPM_INSTALL_SSHPASS} + - INSTALL_PCNTL=${PHP_FPM_INSTALL_PCNTL} - ADDITIONAL_LOCALES=${PHP_FPM_ADDITIONAL_LOCALES} - INSTALL_FFMPEG=${PHP_FPM_FFMPEG} - http_proxy From 9a852e7bc7ad256a3dfd38e9cdb7b61f0e2fd7e9 Mon Sep 17 00:00:00 2001 From: Stefan Neuhaus Date: Thu, 25 Jul 2019 08:02:59 +0200 Subject: [PATCH 05/24] Implementing Cassandra DB & PHP Extension --- cassandra/Dockerfile | 5 +++++ docker-compose.yml | 38 ++++++++++++++++++++++++++++++++++++++ env-example | 36 ++++++++++++++++++++++++++++++++++++ laravel-horizon/Dockerfile | 22 ++++++++++++++++++++++ php-worker/Dockerfile | 20 ++++++++++++++++++++ workspace/Dockerfile | 31 +++++++++++++++++++++++++++++++ 6 files changed, 152 insertions(+) create mode 100644 cassandra/Dockerfile diff --git a/cassandra/Dockerfile b/cassandra/Dockerfile new file mode 100644 index 00000000..cdf280aa --- /dev/null +++ b/cassandra/Dockerfile @@ -0,0 +1,5 @@ +ARG CASSANDRA_VERSION=latest +FROM bitnami/cassandra:${CASSANDRA_VERSION} + +LABEL maintainer="Stefan Neuhaus " + diff --git a/docker-compose.yml b/docker-compose.yml index 69b5dc69..6773264b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -45,6 +45,8 @@ volumes: driver: ${VOLUMES_DRIVER} sonarqube: driver: ${VOLUMES_DRIVER} + cassandra: + driver: ${VOLUMES_DRIVER} services: @@ -67,6 +69,7 @@ services: - INSTALL_IMAP=${WORKSPACE_INSTALL_IMAP} - INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO} - INSTALL_AMQP=${WORKSPACE_INSTALL_AMQP} + - INSTALL_CASSANDRA=${WORKSPACE_INSTALL_CASSANDRA} - INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS} - INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL} - INSTALL_NODE=${WORKSPACE_INSTALL_NODE} @@ -153,6 +156,7 @@ services: - INSTALL_IMAP=${PHP_FPM_INSTALL_IMAP} - INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO} - INSTALL_AMQP=${PHP_FPM_INSTALL_AMQP} + - INSTALL_CASSANDRA=${PHP_FPM_INSTALL_CASSANDRA} - INSTALL_MSSQL=${PHP_FPM_INSTALL_MSSQL} - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH} - INSTALL_GMP=${PHP_FPM_INSTALL_GMP} @@ -220,6 +224,7 @@ services: - INSTALL_ZIP_ARCHIVE=${PHP_WORKER_INSTALL_ZIP_ARCHIVE} - INSTALL_MYSQL_CLIENT=${PHP_WORKER_INSTALL_MYSQL_CLIENT} - INSTALL_AMQP=${PHP_WORKER_INSTALL_AMQP} + - INSTALL_CASSANDRA=${PHP_WORKER_INSTALL_CASSANDRA} - INSTALL_GHOSTSCRIPT=${PHP_WORKER_INSTALL_GHOSTSCRIPT} - INSTALL_SWOOLE=${PHP_WORKER_INSTALL_SWOOLE} - INSTALL_TAINT=${PHP_WORKER_INSTALL_TAINT} @@ -246,6 +251,7 @@ services: - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH} - INSTALL_MEMCACHED=${PHP_FPM_INSTALL_MEMCACHED} - INSTALL_AMQP=${PHP_FPM_INSTALL_AMQP} + - INSTALL_CASSANDRA=${PHP_FPM_INSTALL_CASSANDRA} volumes: - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER} - ./laravel-horizon/supervisord.d:/etc/supervisord.d @@ -584,6 +590,38 @@ services: networks: - backend +### Cassandra ############################################ + cassandra: + build: ./cassandra + ports: + - "${CASSANDRA_TRANSPORT_PORT_NUMBER}:7000" + - "${CASSANDRA_JMX_PORT_NUMBER}:7199" + - "${CASSANDRA_CQL_PORT_NUMBER}:9042" + privileged: true + environment: + - CASSANDRA_VERSION=${CASSANDRA_VERSION} + - CASSANDRA_TRANSPORT_PORT_NUMBER=${CASSANDRA_TRANSPORT_PORT_NUMBER} + - CASSANDRA_JMX_PORT_NUMBER=${CASSANDRA_JMX_PORT_NUMBER} + - CASSANDRA_CQL_PORT_NUMBER=${CASSANDRA_CQL_PORT_NUMBER} + - CASSANDRA_USER=${CASSANDRA_USER} + - CASSANDRA_PASSWORD_SEEDER=${CASSANDRA_PASSWORD_SEEDER} + - CASSANDRA_PASSWORD=${CASSANDRA_PASSWORD} + - CASSANDRA_NUM_TOKENS=${CASSANDRA_NUM_TOKENS} + - CASSANDRA_HOST=${CASSANDRA_HOST} + - CASSANDRA_CLUSTER_NAME=${CASSANDRA_CLUSTER_NAME} + - CASSANDRA_SEEDS=${CASSANDRA_SEEDS} + - CASSANDRA_ENDPOINT_SNITCH=${CASSANDRA_ENDPOINT_SNITCH} + - CASSANDRA_ENABLE_RPC=${CASSANDRA_ENABLE_RPC} + - CASSANDRA_DATACENTER=${CASSANDRA_DATACENTER} + - CASSANDRA_RACK=${CASSANDRA_RACK} + hostname: laradock-cassandra + volumes: + - ${DATA_PATH_HOST}/cassandra:/var/lib/cassandra + depends_on: + - php-fpm + networks: + - backend + ### Beanstalkd Console ################################### beanstalkd-console: build: ./beanstalkd-console diff --git a/env-example b/env-example index a7bf59bc..a4793a7c 100644 --- a/env-example +++ b/env-example @@ -106,6 +106,7 @@ WORKSPACE_INSTALL_XSL=false WORKSPACE_INSTALL_IMAP=false WORKSPACE_INSTALL_MONGO=false WORKSPACE_INSTALL_AMQP=false +WORKSPACE_INSTALL_CASSANDRA=false WORKSPACE_INSTALL_MSSQL=false WORKSPACE_INSTALL_DRUSH=false WORKSPACE_DRUSH_VERSION=8.1.17 @@ -161,6 +162,7 @@ PHP_FPM_INSTALL_PHPDBG=false PHP_FPM_INSTALL_IMAP=false PHP_FPM_INSTALL_MONGO=false PHP_FPM_INSTALL_AMQP=false +PHP_FPM_INSTALL_CASSANDRA=false PHP_FPM_INSTALL_MSSQL=false PHP_FPM_INSTALL_SSH2=false PHP_FPM_INSTALL_SOAP=false @@ -205,6 +207,7 @@ PHP_WORKER_INSTALL_SWOOLE=false PHP_WORKER_INSTALL_TAINT=false PHP_WORKER_INSTALL_FFMPEG=false PHP_WORKER_INSTALL_GMP=false +PHP_WORKER_INSTALL_CASSANDRA=false PHP_WORKER_PUID=1000 PHP_WORKER_PGID=1000 @@ -731,3 +734,36 @@ SONARQUBE_POSTGRES_HOST=postgres SONARQUBE_POSTGRES_DB=sonar SONARQUBE_POSTGRES_USER=sonar SONARQUBE_POSTGRES_PASSWORD=sonarPass + +### CASSANDRA ################################################ + +# Cassandra Version, supported tags can be found at https://hub.docker.com/r/bitnami/cassandra/ +CASSANDRA_VERSION=latest +# Inter-node cluster communication port. Default: 7000 +CASSANDRA_TRANSPORT_PORT_NUMBER=7000 +# JMX connections port. Default: 7199 +CASSANDRA_JMX_PORT_NUMBER=7199 +# Client port. Default: 9042. +CASSANDRA_CQL_PORT_NUMBER=9042 +# Cassandra user name. Defaults: cassandra +CASSANDRA_USER=cassandra +# Password seeder will change the Cassandra default credentials at initialization. In clusters, only one node should be marked as password seeder. Default: no +CASSANDRA_PASSWORD_SEEDER=no +# Cassandra user password. Default: cassandra +CASSANDRA_PASSWORD=cassandra +# Number of tokens for the node. Default: 256. +CASSANDRA_NUM_TOKENS=256 +# Hostname used to configure Cassandra. It can be either an IP or a domain. If left empty, it will be resolved to the machine IP. +CASSANDRA_HOST= +# Cluster name to configure Cassandra.. Defaults: My Cluster +CASSANDRA_CLUSTER_NAME="My Cluster" +# : Hosts that will act as Cassandra seeds. No defaults. +CASSANDRA_SEEDS= + # Snitch name (which determines which data centers and racks nodes belong to). Default SimpleSnitch +CASSANDRA_ENDPOINT_SNITCH=SimpleSnitch + # Enable the thrift RPC endpoint. Default :true +CASSANDRA_ENABLE_RPC=true +# Datacenter name for the cluster. Ignored in SimpleSnitch endpoint snitch. Default: dc1. +CASSANDRA_DATACENTER=dc1 +# Rack name for the cluster. Ignored in SimpleSnitch endpoint snitch. Default: rack1. +CASSANDRA_RACK=rack1 \ No newline at end of file diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index e89468e8..c9486163 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -45,6 +45,28 @@ RUN if [ ${INSTALL_PGSQL} = true ]; then \ && docker-php-ext-install pdo_pgsql \ ;fi +# Install Cassandra drivers: +ARG INSTALL_CASSANDRA=false +RUN if [ ${INSTALL_CASSANDRA} = true ]; then \ + apk --update add cassandra-cpp-driver \ + ;fi + +WORKDIR /usr/src +RUN if [ ${INSTALL_CASSANDRA} = true ]; then \ + git clone https://github.com/datastax/php-driver.git \ + && cd php-driver/ext \ + && phpize \ + && mkdir -p /usr/src/php-driver/build \ + && cd /usr/src/php-driver/build \ + && ../ext/configure > /dev/null \ + && make clean >/dev/null \ + && make >/dev/null 2>&1 \ + && make install \ + && docker-php-ext-enable cassandra \ +;fi + + + ########################################################################### # PHP Memcached: ########################################################################### diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 5297c7b5..b8d482d2 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -85,6 +85,26 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \ docker-php-ext-install sockets \ ;fi +# Install Cassandra drivers: +ARG INSTALL_CASSANDRA=false +RUN if [ ${INSTALL_CASSANDRA} = true ]; then \ + apk --update add cassandra-cpp-driver \ + ;fi + +WORKDIR /usr/src +RUN if [ ${INSTALL_CASSANDRA} = true ]; then \ + git clone https://github.com/datastax/php-driver.git \ + && cd php-driver/ext \ + && phpize \ + && mkdir -p /usr/src/php-driver/build \ + && cd /usr/src/php-driver/build \ + && ../ext/configure --with-php-config=/usr/bin/php-config7.1 > /dev/null \ + && make clean >/dev/null \ + && make >/dev/null 2>&1 \ + && make install \ + && docker-php-ext-enable cassandra \ +;fi + # Install Phalcon ext ARG INSTALL_PHALCON=false ARG PHALCON_VERSION diff --git a/workspace/Dockerfile b/workspace/Dockerfile index bdc0349f..cbbeb2e9 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -406,6 +406,37 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \ ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/amqp.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-amqp.ini \ ;fi +########################################################################### +# CASSANDRA: +########################################################################### + +ARG INSTALL_CASSANDRA=false + +RUN if [ ${INSTALL_CASSANDRA} = true ]; then \ + apt-get install libgmp-dev -y && \ + curl https://downloads.datastax.com/cpp-driver/ubuntu/18.04/dependencies/libuv/v1.28.0/libuv1-dev_1.28.0-1_amd64.deb -o libuv1-dev.deb && \ + curl https://downloads.datastax.com/cpp-driver/ubuntu/18.04/dependencies/libuv/v1.28.0/libuv1_1.28.0-1_amd64.deb -o libuv1.deb && \ + curl https://downloads.datastax.com/cpp-driver/ubuntu/18.04/cassandra/v2.12.0/cassandra-cpp-driver-dev_2.12.0-1_amd64.deb -o cassandra-cpp-driver-dev.deb && \ + curl https://downloads.datastax.com/cpp-driver/ubuntu/18.04/cassandra/v2.12.0/cassandra-cpp-driver_2.12.0-1_amd64.deb -o cassandra-cpp-driver.deb && \ + dpkg -i libuv1.deb && \ + dpkg -i libuv1-dev.deb && \ + dpkg -i cassandra-cpp-driver.deb && \ + dpkg -i cassandra-cpp-driver-dev.deb && \ + rm libuv1.deb libuv1-dev.deb cassandra-cpp-driver-dev.deb cassandra-cpp-driver.deb && \ + cd /usr/src && \ + git clone https://github.com/datastax/php-driver.git && \ + cd /usr/src/php-driver/ext && \ + phpize && \ + mkdir /usr/src/php-driver/build && \ + cd /usr/src/php-driver/build && \ + ../ext/configure > /dev/null && \ + make clean >/dev/null && \ + make >/dev/null 2>&1 && \ + make install && \ + echo "extension=cassandra.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/cassandra.ini && \ + ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/cassandra.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-cassandra.ini \ +;fi + ########################################################################### # PHP REDIS EXTENSION ########################################################################### From 99ceef7b458973251d53c606eebf6277dcb0fe62 Mon Sep 17 00:00:00 2001 From: Stefan Neuhaus Date: Thu, 25 Jul 2019 08:08:01 +0200 Subject: [PATCH 06/24] Update documentation for Cassandra --- DOCUMENTATION/content/introduction/index.md | 1 + 1 file changed, 1 insertion(+) diff --git a/DOCUMENTATION/content/introduction/index.md b/DOCUMENTATION/content/introduction/index.md index 4874e437..143faa20 100644 --- a/DOCUMENTATION/content/introduction/index.md +++ b/DOCUMENTATION/content/introduction/index.md @@ -125,6 +125,7 @@ That's it! enjoy :) - Neo4j - CouchDB - RethinkDB + - Cassandra - **Database Management Apps:** From 4cb6ffc76655c8c70dc326f5f548d41cc2b37814 Mon Sep 17 00:00:00 2001 From: Stefan Neuhaus Date: Thu, 25 Jul 2019 08:14:50 +0200 Subject: [PATCH 07/24] Added Cassandra for testing CI --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d4731771..8773aa32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ env: - PHP_VERSION=NA BUILD_SERVICE=solr - PHP_VERSION=NA BUILD_SERVICE="mssql rethinkdb aerospike" - - PHP_VERSION=NA BUILD_SERVICE="blackfire minio percona nginx caddy apache2 mysql mariadb postgres postgres-postgis neo4j mongo redis" + - PHP_VERSION=NA BUILD_SERVICE="blackfire minio percona nginx caddy apache2 mysql mariadb postgres postgres-postgis neo4j mongo redis cassandra" - PHP_VERSION=NA BUILD_SERVICE="adminer phpmyadmin pgadmin" - PHP_VERSION=NA BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 haproxy" - PHP_VERSION=NA BUILD_SERVICE="kibana grafana laravel-echo-server" From 044261b06fe461c5193581c9863531b06cc343df Mon Sep 17 00:00:00 2001 From: Stefan Neuhaus Date: Thu, 25 Jul 2019 12:03:21 +0200 Subject: [PATCH 08/24] Implement Gearman Message broker & PHP Extension --- .travis.yml | 2 +- DOCUMENTATION/content/introduction/index.md | 1 + docker-compose.yml | 36 +++++++++++++++ env-example | 50 ++++++++++++++++++++- gearman/Dockerfile | 5 +++ php-fpm/Dockerfile | 24 ++++++++++ php-worker/Dockerfile | 7 +++ workspace/Dockerfile | 12 +++++ 8 files changed, 135 insertions(+), 2 deletions(-) create mode 100644 gearman/Dockerfile diff --git a/.travis.yml b/.travis.yml index 8773aa32..8d92a02b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,7 +31,7 @@ env: - PHP_VERSION=NA BUILD_SERVICE="mssql rethinkdb aerospike" - PHP_VERSION=NA BUILD_SERVICE="blackfire minio percona nginx caddy apache2 mysql mariadb postgres postgres-postgis neo4j mongo redis cassandra" - PHP_VERSION=NA BUILD_SERVICE="adminer phpmyadmin pgadmin" - - PHP_VERSION=NA BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 haproxy" + - PHP_VERSION=NA BUILD_SERVICE="memcached beanstalkd beanstalkd-console rabbitmq elasticsearch certbot mailhog maildev selenium jenkins proxy proxy2 haproxy gearman" - PHP_VERSION=NA BUILD_SERVICE="kibana grafana laravel-echo-server" - PHP_VERSION=NA BUILD_SERVICE="ipython-controller manticore" # - PHP_VERSION=NA BUILD_SERVICE="aws" diff --git a/DOCUMENTATION/content/introduction/index.md b/DOCUMENTATION/content/introduction/index.md index 143faa20..48acd748 100644 --- a/DOCUMENTATION/content/introduction/index.md +++ b/DOCUMENTATION/content/introduction/index.md @@ -149,6 +149,7 @@ That's it! enjoy :) - Eclipse Mosquitto - PHP Worker - Laravel Horizon + - Gearman - **Mail Servers:** - Mailu diff --git a/docker-compose.yml b/docker-compose.yml index 6773264b..6712fd46 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -70,6 +70,7 @@ services: - INSTALL_MONGO=${WORKSPACE_INSTALL_MONGO} - INSTALL_AMQP=${WORKSPACE_INSTALL_AMQP} - INSTALL_CASSANDRA=${WORKSPACE_INSTALL_CASSANDRA} + - INSTALL_GEARMAN=${WORKSPACE_INSTALL_GEARMAN} - INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS} - INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL} - INSTALL_NODE=${WORKSPACE_INSTALL_NODE} @@ -157,6 +158,7 @@ services: - INSTALL_MONGO=${PHP_FPM_INSTALL_MONGO} - INSTALL_AMQP=${PHP_FPM_INSTALL_AMQP} - INSTALL_CASSANDRA=${PHP_FPM_INSTALL_CASSANDRA} + - INSTALL_GEARMAN=${PHP_FPM_INSTALL_GEARMAN} - INSTALL_MSSQL=${PHP_FPM_INSTALL_MSSQL} - INSTALL_BCMATH=${PHP_FPM_INSTALL_BCMATH} - INSTALL_GMP=${PHP_FPM_INSTALL_GMP} @@ -225,6 +227,7 @@ services: - INSTALL_MYSQL_CLIENT=${PHP_WORKER_INSTALL_MYSQL_CLIENT} - INSTALL_AMQP=${PHP_WORKER_INSTALL_AMQP} - INSTALL_CASSANDRA=${PHP_WORKER_INSTALL_CASSANDRA} + - INSTALL_GEARMAN=${PHP_WORKER_INSTALL_GEARMAN} - INSTALL_GHOSTSCRIPT=${PHP_WORKER_INSTALL_GHOSTSCRIPT} - INSTALL_SWOOLE=${PHP_WORKER_INSTALL_SWOOLE} - INSTALL_TAINT=${PHP_WORKER_INSTALL_TAINT} @@ -622,6 +625,39 @@ services: networks: - backend +### Gearman ############################################ + gearman: + build: ./gearman + ports: + - "${GEARMAN_PORT}:4730" + privileged: true + environment: + - GEARMAN_VERSION=${GEARMAN_VERSION} + - GEARMAN_VERBOSE=${GEARMAN_VERBOSE} + - GEARMAN_QUEUE_TYPE=${GEARMAN_QUEUE_TYPE} + - GEARMAN_THREADS=${GEARMAN_THREADS} + - GEARMAN_BACKLOG=${GEARMAN_BACKLOG} + - GEARMAN_FILE_DESCRIPTORS=${GEARMAN_FILE_DESCRIPTORS} + - GEARMAN_JOB_RETRIES=${GEARMAN_JOB_RETRIES} + - GEARMAN_ROUND_ROBIN=${GEARMAN_ROUND_ROBIN} + - GEARMAN_WORKER_WAKEUP=${GEARMAN_WORKER_WAKEUP} + - GEARMAN_KEEPALIVE=${GEARMAN_KEEPALIVE} + - GEARMAN_KEEPALIVE_IDLE=${GEARMAN_KEEPALIVE_IDLE} + - GEARMAN_KEEPALIVE_INTERVAL=${GEARMAN_KEEPALIVE_INTERVAL} + - GEARMAN_KEEPALIVE_COUNT=${GEARMAN_KEEPALIVE_COUNT} + - GEARMAN_MYSQL_HOST=${GEARMAN_MYSQL_HOST} + - GEARMAN_MYSQL_PORT=${GEARMAN_MYSQL_PORT} + - GEARMAN_MYSQL_USER=${GEARMAN_MYSQL_USER} + - GEARMAN_MYSQL_PASSWORD=${GEARMAN_MYSQL_PASSWORD} + - GEARMAN_MYSQL_PASSWORD_FILE=${GEARMAN_MYSQL_PASSWORD_FILE} + - GEARMAN_MYSQL_DB=${GEARMAN_MYSQL_DB} + - GEARMAN_MYSQL_TABLE=${GEARMAN_MYSQL_TABLE} + hostname: laradock-gearman + depends_on: + - php-fpm + networks: + - backend + ### Beanstalkd Console ################################### beanstalkd-console: build: ./beanstalkd-console diff --git a/env-example b/env-example index a4793a7c..d8749d17 100644 --- a/env-example +++ b/env-example @@ -107,6 +107,7 @@ WORKSPACE_INSTALL_IMAP=false WORKSPACE_INSTALL_MONGO=false WORKSPACE_INSTALL_AMQP=false WORKSPACE_INSTALL_CASSANDRA=false +WORKSPACE_INSTALL_GEARMAN=false WORKSPACE_INSTALL_MSSQL=false WORKSPACE_INSTALL_DRUSH=false WORKSPACE_DRUSH_VERSION=8.1.17 @@ -163,6 +164,7 @@ PHP_FPM_INSTALL_IMAP=false PHP_FPM_INSTALL_MONGO=false PHP_FPM_INSTALL_AMQP=false PHP_FPM_INSTALL_CASSANDRA=false +PHP_FPM_INSTALL_GEARMAN=false PHP_FPM_INSTALL_MSSQL=false PHP_FPM_INSTALL_SSH2=false PHP_FPM_INSTALL_SOAP=false @@ -208,6 +210,7 @@ PHP_WORKER_INSTALL_TAINT=false PHP_WORKER_INSTALL_FFMPEG=false PHP_WORKER_INSTALL_GMP=false PHP_WORKER_INSTALL_CASSANDRA=false +PHP_WORKER_INSTALL_GEARMAN=false PHP_WORKER_PUID=1000 PHP_WORKER_PGID=1000 @@ -766,4 +769,49 @@ CASSANDRA_ENABLE_RPC=true # Datacenter name for the cluster. Ignored in SimpleSnitch endpoint snitch. Default: dc1. CASSANDRA_DATACENTER=dc1 # Rack name for the cluster. Ignored in SimpleSnitch endpoint snitch. Default: rack1. -CASSANDRA_RACK=rack1 \ No newline at end of file +CASSANDRA_RACK=rack1 + +### GEARMAN ################################################## + +# Gearman version to use. See available tags at https://hub.docker.com/r/artefactual/gearmand +GEARMAN_VERSION=latest +# Port to use (Default: 6379) +GEARMAN_PORT=6379 +# Logging Level (Default: INFO) +GEARMAN_VERBOSE=INFO +# Persistent queue type to use (Default: builtin) +GEARMAN_QUEUE_TYPE=builtin +# Number of I/O threads to use (Default: 4) +GEARMAN_THREADS=4 +# Number of backlog connections for listen (Default: 32) +GEARMAN_BACKLOG=32 +# Number of file descriptors to allow for the process (Default is max allowed for user) +GEARMAN_FILE_DESCRIPTORS= +# Number of attempts to run the job before the job server removes it. (Default: no limit = 0) +GEARMAN_JOB_RETRIES=0 +# Assign work in round-robin order per worker connection (Default: 0) +GEARMAN_ROUND_ROBIN=0 +# Number of workers to wakeup for each job received (Default: 0) +GEARMAN_WORKER_WAKEUP=0 +# Enable keepalive on sockets (Default: 0) +GEARMAN_KEEPALIVE=0 +# The duration between two keepalive transmissions in idle condition (Default: 30) +GEARMAN_KEEPALIVE_IDLE=30 +# The duration between two successive keepalive retransmissions, if acknowledgement to the previous keepalive transmission is not received (Default: 10) +GEARMAN_KEEPALIVE_INTERVAL=10 +# The number of retransmissions to be carried out before declaring that remote end is not available (Default: 5) +GEARMAN_KEEPALIVE_COUNT=5 +# Mysql server host (Default: localhost) +GEARMAN_MYSQL_HOST=localhost +# Mysql server port (Default: 3306) +GEARMAN_MYSQL_PORT=3306 +# Mysql server user (Default: root) +GEARMAN_MYSQL_USER=root +# Mysql password +GEARMAN_MYSQL_PASSWORD= +# Path to file with mysql password(Docker secrets) +GEARMAN_MYSQL_PASSWORD_FILE= +# Database to use by Gearman (Default: Gearmand) +GEARMAN_MYSQL_DB=Gearmand +# Table to use by Gearman (Default: gearman_queue) +GEARMAN_MYSQL_TABLE=gearman_queue \ No newline at end of file diff --git a/gearman/Dockerfile b/gearman/Dockerfile new file mode 100644 index 00000000..79a0e75b --- /dev/null +++ b/gearman/Dockerfile @@ -0,0 +1,5 @@ +ARG GEARMAN_VERSION=latest +FROM artefactual/gearmand:${GEARMAN_VERSION} + +LABEL maintainer="Stefan Neuhaus " + diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index a25e5f42..54207db7 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -306,6 +306,30 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \ docker-php-ext-install sockets \ ;fi +########################################################################### +# GEARMAN: +########################################################################### + +ARG INSTALL_GEARMAN=false + +RUN if [ ${INSTALL_GEARMAN} = true ]; then \ + apt-get update && \ + apt-get -y install libgearman-dev && \ + cd /tmp && \ + curl -L https://github.com/wcgallego/pecl-gearman/archive/gearman-2.0.5.zip -O && \ + unzip gearman-2.0.5.zip && \ + mv pecl-gearman-gearman-2.0.5 pecl-gearman && \ + cd /tmp/pecl-gearman && \ + phpize && \ + ./configure && \ + make -j$(nproc) && \ + make install && \ + cd / && \ + rm /tmp/gearman-2.0.5.zip && \ + rm -r /tmp/pecl-gearman && \ + docker-php-ext-enable gearman \ +;fi + ########################################################################### # pcntl ########################################################################### diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index b8d482d2..fdd527cd 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -85,6 +85,13 @@ RUN if [ ${INSTALL_AMQP} = true ]; then \ docker-php-ext-install sockets \ ;fi +# Install Gearman: +ARG INSTALL_GEARMAN=false + +RUN if [ ${INSTALL_GEARMAN} = true ]; then \ + docker-php-ext-install gearman \ +;fi + # Install Cassandra drivers: ARG INSTALL_CASSANDRA=false RUN if [ ${INSTALL_CASSANDRA} = true ]; then \ diff --git a/workspace/Dockerfile b/workspace/Dockerfile index cbbeb2e9..06567f2c 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -437,6 +437,18 @@ RUN if [ ${INSTALL_CASSANDRA} = true ]; then \ ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/cassandra.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/30-cassandra.ini \ ;fi +########################################################################### +# Gearman: +########################################################################### + +ARG INSTALL_GEARMAN=false + +RUN if [ ${INSTALL_GEARMAN} = true ]; then \ + add-apt-repository -y ppa:ondrej/pkg-gearman && \ + apt-get update && \ + apt-get install php-gearman -y \ +;fi + ########################################################################### # PHP REDIS EXTENSION ########################################################################### From 237e39b40d11b56540803bd17bd73b7c48141fcc Mon Sep 17 00:00:00 2001 From: PeliCan <51474517+pelicancode@users.noreply.github.com> Date: Sat, 21 Sep 2019 15:56:09 +0200 Subject: [PATCH 09/24] MySql config file permissions fix Reason: [Warning] World-writable config file '/etc/mysql/docker-default.d/my.cnf' is ignored --- mysql/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql/Dockerfile b/mysql/Dockerfile index 3fe5bdcf..03bb15ca 100644 --- a/mysql/Dockerfile +++ b/mysql/Dockerfile @@ -13,6 +13,8 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone & COPY my.cnf /etc/mysql/conf.d/my.cnf +RUN chmod 0444 /etc/mysql/conf.d/my.cnf + CMD ["mysqld"] EXPOSE 3306 From 6139805561f7e333d22902ab44e74763cbeea38c Mon Sep 17 00:00:00 2001 From: Rex Tsou Date: Mon, 30 Sep 2019 13:59:03 +0800 Subject: [PATCH 10/24] Fix README.md maintainers links --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index ddb90d8e..3e794ffc 100644 --- a/README.md +++ b/README.md @@ -53,28 +53,28 @@ Laradock exists thanks to all the people who contribute.
Bo-Yi Wu
- @appleboy + @appleboy
Philippe Trépanier
- @philtrep + @philtrep
Mike Erickson
- @mikeerickson + @mikeerickson
Dwi Fahni Denni
- @zeroc0d3 + @zeroc0d3 @@ -83,35 +83,35 @@ Laradock exists thanks to all the people who contribute.
Thor Erik
- @thorerik + @thorerik
Winfried van Loon
- @winfried-van-loon + @winfried-van-loon
TJ Miller
- @sixlive + @sixlive
Yu-Lung Shao (Allen)
- @bestlong + @bestlong
Milan Urukalo
- @urukalo + @urukalo @@ -120,28 +120,28 @@ Laradock exists thanks to all the people who contribute.
Vince Chu
- @vwchu + @vwchu
Huadong Zuo
- @zuohuadong + @zuohuadong
Lan Phan
- @lanphan + @lanphan
Ahkui
- @ahkui + @ahkui From 67c5a6a55209de49747a72ca4e3cde2e6a4e81db Mon Sep 17 00:00:00 2001 From: haoyq Date: Mon, 30 Sep 2019 17:10:56 +0800 Subject: [PATCH 11/24] php-worker install redis extension --- docker-compose.yml | 1 + env-example | 1 + php-worker/Dockerfile | 8 ++++++++ 3 files changed, 10 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 07c47f65..1bb6a702 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -231,6 +231,7 @@ services: - INSTALL_TAINT=${PHP_WORKER_INSTALL_TAINT} - INSTALL_FFMPEG=${PHP_WORKER_INSTALL_FFMPEG} - INSTALL_GMP=${PHP_WORKER_INSTALL_GMP} + - INSTALL_REDIS=${PHP_WORKER_INSTALL_REDIS} - PUID=${PHP_WORKER_PUID} - PGID=${PHP_WORKER_PGID} volumes: diff --git a/env-example b/env-example index 0fd9d9db..ad5a4e1a 100644 --- a/env-example +++ b/env-example @@ -208,6 +208,7 @@ PHP_WORKER_INSTALL_TAINT=false PHP_WORKER_INSTALL_FFMPEG=false PHP_WORKER_INSTALL_GMP=false PHP_WORKER_INSTALL_CASSANDRA=false +PHP_WORKER_INSTALL_REDIS=false PHP_WORKER_PUID=1000 PHP_WORKER_PGID=1000 diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index b2e496f3..855cd32f 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -134,6 +134,14 @@ RUN if [ ${INSTALL_GMP} = true ]; then \ RUN rm /var/cache/apk/* \ && mkdir -p /var/www +# Install Redis package: +ARG INSTALL_REDIS=false +RUN if [ ${INSTALL_REDIS} = true ]; then \ + # Install Redis Extension + printf "\n" | pecl install -o -f redis \ + && rm -rf /tmp/pear \ + && docker-php-ext-enable redis \ +;fi ########################################################################### # Swoole EXTENSION From 902e041f7beb067400eb601c847724d7dddd5186 Mon Sep 17 00:00:00 2001 From: Aaron Stone Date: Wed, 2 Oct 2019 11:57:23 -0700 Subject: [PATCH 12/24] Use released versions of memcached extension --- php-fpm/Dockerfile | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 3e39d2ec..99a7beb4 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -364,21 +364,10 @@ ARG INSTALL_MEMCACHED=false RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ # Install the php memcached extension if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ - curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/2.2.0.tar.gz"; \ + pecl install memcached-2.2.0 else \ - curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/master.tar.gz"; \ - fi \ - && mkdir -p memcached \ - && tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \ - && ( \ - cd memcached \ - && phpize \ - && ./configure \ - && make -j$(nproc) \ - && make install \ - ) \ - && rm -r memcached \ - && rm /tmp/memcached.tar.gz \ + pecl install memcached-3.1.3 + fi && docker-php-ext-enable memcached \ ;fi From 4dcef17515e4e19b35cb5b144c1f4fe0ff09fe9d Mon Sep 17 00:00:00 2001 From: Andrey Barashkov Date: Fri, 4 Oct 2019 23:55:56 +0300 Subject: [PATCH 13/24] Update README.md Fix link to Maintainers profile --- README.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index ddb90d8e..3e794ffc 100644 --- a/README.md +++ b/README.md @@ -53,28 +53,28 @@ Laradock exists thanks to all the people who contribute.
Bo-Yi Wu
- @appleboy + @appleboy
Philippe Trépanier
- @philtrep + @philtrep
Mike Erickson
- @mikeerickson + @mikeerickson
Dwi Fahni Denni
- @zeroc0d3 + @zeroc0d3 @@ -83,35 +83,35 @@ Laradock exists thanks to all the people who contribute.
Thor Erik
- @thorerik + @thorerik
Winfried van Loon
- @winfried-van-loon + @winfried-van-loon
TJ Miller
- @sixlive + @sixlive
Yu-Lung Shao (Allen)
- @bestlong + @bestlong
Milan Urukalo
- @urukalo + @urukalo @@ -120,28 +120,28 @@ Laradock exists thanks to all the people who contribute.
Vince Chu
- @vwchu + @vwchu
Huadong Zuo
- @zuohuadong + @zuohuadong
Lan Phan
- @lanphan + @lanphan
Ahkui
- @ahkui + @ahkui From 54a29b178af433f4e50afcb700cca76cf5218502 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Mon, 7 Oct 2019 10:49:11 +0800 Subject: [PATCH 14/24] php-worker: move clean up step to right palce (#2315) --- php-worker/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 855cd32f..cf1ace7f 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -130,10 +130,6 @@ RUN if [ ${INSTALL_GMP} = true ]; then \ && docker-php-ext-install gmp \ ;fi - -RUN rm /var/cache/apk/* \ - && mkdir -p /var/www - # Install Redis package: ARG INSTALL_REDIS=false RUN if [ ${INSTALL_REDIS} = true ]; then \ @@ -213,4 +209,8 @@ RUN php -v | head -n 1 | grep -q "PHP ${PHP_VERSION}." #-------------------------------------------------------------------------- # +# Clean up +RUN rm /var/cache/apk/* \ + && mkdir -p /var/www + WORKDIR /etc/supervisor/conf.d/ From 8755e445d94178109d91bd33180b03753548025a Mon Sep 17 00:00:00 2001 From: Edwin Hui Date: Mon, 7 Oct 2019 11:18:44 +0800 Subject: [PATCH 15/24] CHANGE_SOURCE arg missing for php-fpm (#2311) --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index aecd5913..00e8033d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -146,6 +146,7 @@ services: build: context: ./php-fpm args: + - CHANGE_SOURCE=${CHANGE_SOURCE} - LARADOCK_PHP_VERSION=${PHP_VERSION} - LARADOCK_PHALCON_VERSION=${PHALCON_VERSION} - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} From 25f883fc993a6e2f1ac3dd8af72bc163271b28c6 Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Mon, 7 Oct 2019 16:19:19 +0800 Subject: [PATCH 16/24] laravel-horizon: fix memcached (#2316) Fix #2278 --- laravel-horizon/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index 766b2459..5ce1d8ef 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -87,7 +87,7 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/2.2.0.tar.gz"; \ else \ - curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz"; \ + curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/v3.1.3.tar.gz"; \ fi \ && mkdir -p memcached \ && tar -C memcached -zxvf /tmp/memcached.tar.gz --strip 1 \ From 4af8ac8f53a70ea419452ee7af5dece0fa733dca Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Mon, 7 Oct 2019 17:06:09 +0800 Subject: [PATCH 17/24] fix syntex error (#2317) * fix syntex error cause by #2309 --- php-fpm/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index faa0d594..2617dbe5 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -364,10 +364,10 @@ ARG INSTALL_MEMCACHED=false RUN if [ ${INSTALL_MEMCACHED} = true ]; then \ # Install the php memcached extension if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ - pecl install memcached-2.2.0 + pecl install memcached-2.2.0; \ else \ - pecl install memcached-3.1.3 - fi + pecl install memcached-3.1.3; \ + fi \ && docker-php-ext-enable memcached \ ;fi From b7b468765ac0fcf19b5c7065e24f3ea0d3134b2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?La=C3=A9rcio=20de=20Sousa?= Date: Tue, 8 Oct 2019 09:11:02 -0300 Subject: [PATCH 18/24] Add sample configuration for Visual Studio Code Remote Development on Containers. --- .devcontainer/devcontainer.example.json | 9 +++++++++ .gitignore | 5 ++++- DOCUMENTATION/content/guides/index.md | 10 ++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 .devcontainer/devcontainer.example.json diff --git a/.devcontainer/devcontainer.example.json b/.devcontainer/devcontainer.example.json new file mode 100644 index 00000000..4be22f7f --- /dev/null +++ b/.devcontainer/devcontainer.example.json @@ -0,0 +1,9 @@ +{ + "name": "Laradock", + "dockerComposeFile": ["../docker-compose.yml"], + "runServices": ["nginx", "postgres", "pgadmin"], + "service": "workspace", + "workspaceFolder": "/var/www", + "shutdownAction": "stopCompose", + "postCreateCommand": "uname -a" +} diff --git a/.gitignore b/.gitignore index 06732062..06eccb52 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,7 @@ /nginx/ssl/*.key /nginx/ssl/*.csr -.DS_Store \ No newline at end of file +/.devcontainer/* +!/.devcontainer/devcontainer.example.json + +.DS_Store diff --git a/DOCUMENTATION/content/guides/index.md b/DOCUMENTATION/content/guides/index.md index 9ffd0140..ab8c9c7e 100644 --- a/DOCUMENTATION/content/guides/index.md +++ b/DOCUMENTATION/content/guides/index.md @@ -70,6 +70,16 @@ If you want to only execute some command and don't want to enter bash, you can e docker-compose run workspace php artisan migrate ``` +### Prepare for Visual Studio Code remote development + +If you want to use Visual Studio Code for [remote development](https://code.visualstudio.com/docs/remote/containers) directly on your `workspace` container, copy file `devcontainer.example.json` to `devcontainer.json` and customize it (see [devcontainer.json reference](https://code.visualstudio.com/docs/remote/containers#_devcontainerjson-reference) for more options): +``` +cd .devcontainer +cp devcontainer.example.json devcontainer.json +``` + +Then open your `laradock` folder in Visual Studio Code and click on popup button **Reopen in Container**. + ### Install and configure Laravel Let's install Laravel's dependencies, add the `.env` file, generate the key and give proper permissions to the cache folder. From 6764a88fe630b5ca1c53c4c630a9c58c4958253f Mon Sep 17 00:00:00 2001 From: Alone <794000949@qq.com> Date: Wed, 16 Oct 2019 18:18:03 +0800 Subject: [PATCH 19/24] Install supervistor in the workspace --- docker-compose.yml | 1 + env-example | 1 + workspace/Dockerfile | 12 ++++++++++++ 3 files changed, 14 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 896adb59..8d679bac 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -121,6 +121,7 @@ services: - BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID} - BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN} - INSTALL_POWERLINE=${WORKSPACE_INSTALL_POWERLINE} + - INSTALL_SUPERVISOR=${WORKSPACE_INSTALL_SUPERVISOR} - INSTALL_FFMPEG=${WORKSPACE_INSTALL_FFMPEG} - INSTALL_GNU_PARALLEL=${WORKSPACE_INSTALL_GNU_PARALLEL} - http_proxy diff --git a/env-example b/env-example index 1b714796..c8618f42 100644 --- a/env-example +++ b/env-example @@ -124,6 +124,7 @@ WORKSPACE_INSTALL_MC=false WORKSPACE_INSTALL_SYMFONY=false WORKSPACE_INSTALL_PYTHON=false WORKSPACE_INSTALL_POWERLINE=false +WORKSPACE_INSTALL_SUPERVISOR=false WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false WORKSPACE_INSTALL_IMAGEMAGICK=false WORKSPACE_INSTALL_TERRAFORM=false diff --git a/workspace/Dockerfile b/workspace/Dockerfile index f413e903..6081ebd3 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -957,6 +957,18 @@ RUN if [ ${INSTALL_POWERLINE} = true ]; then \ ;fi \ ;fi +########################################################################### +# SUPERVISOR: +########################################################################### +ARG INSTALL_SUPERVISOR=false + +RUN if [ ${INSTALL_SUPERVISOR} = true ]; then \ + if [ ${INSTALL_PYTHON} = true ]; then \ + python -m pip install --upgrade supervisor && \ + echo_supervisord_conf > /etc/supervisord.conf \ + ;fi \ +;fi + USER laradock ########################################################################### From ef9eee2defacfeaba343a9130602ed7f09791d7b Mon Sep 17 00:00:00 2001 From: Mike Hingley Date: Fri, 25 Oct 2019 16:45:46 +0100 Subject: [PATCH 20/24] fix slight typo --- DOCUMENTATION/content/documentation/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index d83b4422..e3ebbcbe 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -650,7 +650,7 @@ docker-compose up -d metabase 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. From f5c00c61bed2358a293e7ff4e838e4f2904fde3b Mon Sep 17 00:00:00 2001 From: Mike Hingley Date: Fri, 25 Oct 2019 17:12:59 +0100 Subject: [PATCH 21/24] Update Confluence section The original text was confusing. Refactored to attempt to make more sense. --- DOCUMENTATION/content/documentation/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index e3ebbcbe..d2b91fb4 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -1054,7 +1054,7 @@ docker-compose up -d confluence 2 - Open your browser and visit the localhost on port **8090**: `http://localhost:8090` -**Note:** You can you trial version and then you have to buy a licence to use it. +**Note:** Confluence is a licensed application - an evaluation licence can be obtained from Atlassian. You can set custom confluence version in `CONFLUENCE_VERSION`. [Find more info in section 'Versioning'](https://hub.docker.com/r/atlassian/confluence-server/) From 7247d8f7cef1c71595c08b5f1bcf3d14cba12b9a Mon Sep 17 00:00:00 2001 From: Lukas Besch Date: Fri, 25 Oct 2019 18:15:40 +0200 Subject: [PATCH 22/24] Install default-mysql-client for PHP 7.3 (#2329) Install default-mysql-client for PHP 7.3 --- php-fpm/Dockerfile | 6 +++++- php-worker/Dockerfile | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index d74ef345..69e8374f 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -708,7 +708,11 @@ ARG INSTALL_MYSQL_CLIENT=false RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \ apt-get update -yqq && \ - apt-get -y install mysql-client \ + if [ ${LARADOCK_PHP_VERSION} = "7.3" ]; then \ + apt-get -y install default-mysql-client \ + ;else \ + apt-get -y install mysql-client \ + ;fi \ ;fi ########################################################################### diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index ac0c1404..9bccca0e 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -66,7 +66,11 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \ # Install MySQL Client: ARG INSTALL_MYSQL_CLIENT=false RUN if [ ${INSTALL_MYSQL_CLIENT} = true ]; then \ - apk --update add mysql-client \ + if [ ${PHP_VERSION} = "7.3" ]; then \ + apk --update add default-mysql-client \ + ;else \ + apk --update add mysql-client \ + ;fi \ ;fi # Install FFMPEG: From 8b2bcc6d153e78c4f5289eb832513e787a84a04b Mon Sep 17 00:00:00 2001 From: Alone <794000949@qq.com> Date: Mon, 28 Oct 2019 17:33:13 +0800 Subject: [PATCH 23/24] add config file for supervisord --- docker-compose.yml | 1 + workspace/Dockerfile | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8d679bac..9d34be7e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -129,6 +129,7 @@ services: - no_proxy volumes: - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG} + - ./php-worker/supervisord.d:/etc/supervisord.d extra_hosts: - "dockerhost:${DOCKER_HOST_IP}" ports: diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 6081ebd3..8a1d4c9d 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -965,7 +965,9 @@ ARG INSTALL_SUPERVISOR=false RUN if [ ${INSTALL_SUPERVISOR} = true ]; then \ if [ ${INSTALL_PYTHON} = true ]; then \ python -m pip install --upgrade supervisor && \ - echo_supervisord_conf > /etc/supervisord.conf \ + echo_supervisord_conf > /etc/supervisord.conf && \ + sed -i 's/\;\[include\]/\[include\]/g' /etc/supervisord.conf && \ + sed -i 's/\;files\s.*/files = supervisord.d\/*.conf/g' /etc/supervisord.conf \ ;fi \ ;fi From 41438e9c311e3d514e2a7b32805724336dca34fa Mon Sep 17 00:00:00 2001 From: Alone <794000949@qq.com> Date: Mon, 28 Oct 2019 17:55:36 +0800 Subject: [PATCH 24/24] add install supervisor document --- DOCUMENTATION/content/documentation/index.md | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index d2b91fb4..d2d574c0 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -1865,6 +1865,27 @@ To install GNU Parallel in the Workspace container +
+ +## Install Supervisor + +Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems. + +(see http://supervisord.org/index.html) + +To install Supervisor in the Workspace container + +1 - Open the `.env` file + +2 - Set `WORKSPACE_INSTALL_SUPERVISOR` and `WORKSPACE_INSTALL_PYTHON` to `true`. + +3 - Re-build the container `docker-compose build workspace` Or `docker-composer up --build -d workspace` + + + + + +