From 3ad37405c6cd91304a0e286dcc2d75f8931beffa Mon Sep 17 00:00:00 2001 From: Pavel Date: Thu, 24 Jan 2019 20:25:08 +0300 Subject: [PATCH 01/55] 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 8027a98f72d2d30161c0a193ceef467c05e629df Mon Sep 17 00:00:00 2001 From: Anton Sannikov Date: Mon, 20 May 2019 22:36:08 +0200 Subject: [PATCH 02/55] Confluence config added --- docker-compose.yml | 20 +++++++++ env-example | 8 ++++ .../docker-entrypoint-initdb.d/.gitignore | 1 + .../init_confluence_db.sh | 44 +++++++++++++++++++ 4 files changed, 73 insertions(+) create mode 100644 postgres/docker-entrypoint-initdb.d/init_confluence_db.sh diff --git a/docker-compose.yml b/docker-compose.yml index 52f0cf31..b022bbd4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -41,6 +41,8 @@ volumes: driver: ${VOLUMES_DRIVER} mosquitto: driver: ${VOLUMES_DRIVER} + confluence: + driver: ${VOLUMES_DRIVER} sonarqube: driver: ${VOLUMES_DRIVER} @@ -414,6 +416,10 @@ services: - SONARQUBE_POSTGRES_DB=${SONARQUBE_POSTGRES_DB} - SONARQUBE_POSTGRES_USER=${SONARQUBE_POSTGRES_USER} - SONARQUBE_POSTGRES_PASSWORD=${SONARQUBE_POSTGRES_PASSWORD} + - POSTGRES_CONFLUENCE_INIT=${CONFLUENCE_POSTGRES_INIT} + - POSTGRES_CONFLUENCE_DB=${CONFLUENCE_POSTGRES_DB} + - POSTGRES_CONFLUENCE_USER=${CONFLUENCE_POSTGRES_USER} + - POSTGRES_CONFLUENCE_PASSWORD=${CONFLUENCE_POSTGRES_PASSWORD} networks: - backend @@ -1459,3 +1465,17 @@ services: networks: - backend - frontend +### CONFLUENCE ################################################ + confluence: + container_name: Confluence + image: atlassian/confluence-server:${CONFLUENCE_VERSION} + restart: always + ports: + - "${CONFLUENCE_HOST_HTTP_PORT}:8090" + networks: + - frontend + - backend + depends_on: + - postgres + volumes: + - ${DATA_PATH_HOST}/Confluence:/var/atlassian/application-data \ No newline at end of file diff --git a/env-example b/env-example index b5986c19..9ba3cdda 100644 --- a/env-example +++ b/env-example @@ -366,6 +366,14 @@ JENKINS_HOST_HTTP_PORT=8090 JENKINS_HOST_SLAVE_AGENT_PORT=50000 JENKINS_HOME=./jenkins/jenkins_home +### CONFLUENCE ############################################### +CONFLUENCE_POSTGRES_INIT=true +CONFLUENCE_VERSION=6.13-ubuntu-18.04-adoptopenjdk8 +CONFLUENCE_POSTGRES_DB=laradock_confluence +CONFLUENCE_POSTGRES_USER=laradock_confluence +CONFLUENCE_POSTGRES_PASSWORD=laradock_confluence +CONFLUENCE_HOST_HTTP_PORT=8090 + ### GRAFANA ############################################### GRAFANA_PORT=3000 diff --git a/postgres/docker-entrypoint-initdb.d/.gitignore b/postgres/docker-entrypoint-initdb.d/.gitignore index 0721338b..a56b450c 100644 --- a/postgres/docker-entrypoint-initdb.d/.gitignore +++ b/postgres/docker-entrypoint-initdb.d/.gitignore @@ -2,3 +2,4 @@ !init_gitlab_db.sh !init_jupyterhub_db.sh !init_sonarqube_db.sh +!init_confluence_db.sh \ No newline at end of file diff --git a/postgres/docker-entrypoint-initdb.d/init_confluence_db.sh b/postgres/docker-entrypoint-initdb.d/init_confluence_db.sh new file mode 100644 index 00000000..ce5e9f72 --- /dev/null +++ b/postgres/docker-entrypoint-initdb.d/init_confluence_db.sh @@ -0,0 +1,44 @@ +#!/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. +# +# +# 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 +# +### default database and user for confluence ############################################## +if [ "$POSTGRES_CONFLUENCE_INIT" == 'true' ]; then + psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL + CREATE USER $POSTGRES_CONFLUENCE_USER WITH PASSWORD '$POSTGRES_CONFLUENCE_PASSWORD'; + CREATE DATABASE $POSTGRES_CONFLUENCE_DB; + GRANT ALL PRIVILEGES ON DATABASE $POSTGRES_CONFLUENCE_DB TO $POSTGRES_CONFLUENCE_USER; + ALTER ROLE $POSTGRES_CONFLUENCE_USER CREATEROLE SUPERUSER; + EOSQL + echo +fi \ No newline at end of file From f23149115d7f8c8ecfe18f82b62f57f02d4d56bc Mon Sep 17 00:00:00 2001 From: Anton Sannikov Date: Mon, 20 May 2019 22:51:36 +0200 Subject: [PATCH 03/55] Confluence docs added --- DOCUMENTATION/content/documentation/index.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index 0704aba4..22aa559c 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -1023,8 +1023,21 @@ _Note: You can customize the port on which beanstalkd console is listening by ch +
+ +## Use Confluence +1 - Run the Confluence Container (`confluence`) with the `docker-compose up` command. Example: +```bash +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. + +You can set custom confluence version in `CONFLUENCE_VERSION`. [Find more info in section 'Versioning'](https://hub.docker.com/r/atlassian/confluence-server/)
From e9eacfafa7d2fe23bf23ff2aaaeb6adcd63027bd Mon Sep 17 00:00:00 2001 From: skipworkgh Date: Tue, 2 Jul 2019 16:11:58 +0200 Subject: [PATCH 04/55] 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 05/55] 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 06/55] 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 07/55] 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 08/55] 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 09/55] 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 10/55] 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 11/55] 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 12/55] 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 13/55] 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 3f9b888139a2811c65842d492bf8ce2817687a50 Mon Sep 17 00:00:00 2001 From: William Ono Date: Mon, 30 Sep 2019 16:08:09 -0700 Subject: [PATCH 14/55] Run php-fpm as different user (#1745) --- docker-compose.yml | 2 ++ env-example | 3 +++ php-fpm/Dockerfile | 9 ++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 07c47f65..53dee769 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -190,6 +190,8 @@ services: - ADDITIONAL_LOCALES=${PHP_FPM_ADDITIONAL_LOCALES} - INSTALL_FFMPEG=${PHP_FPM_FFMPEG} - INSTALL_XHPROF=${PHP_FPM_INSTALL_XHPROF} + - PUID=${PHP_FPM_PUID} + - PGID=${PHP_FPM_PGID} - http_proxy - https_proxy - no_proxy diff --git a/env-example b/env-example index 0fd9d9db..b454fec8 100644 --- a/env-example +++ b/env-example @@ -193,6 +193,9 @@ PHP_FPM_INSTALL_SSHPASS=false PHP_FPM_FFMPEG=false PHP_FPM_ADDITIONAL_LOCALES="es_ES.UTF-8 fr_FR.UTF-8" +PHP_FPM_PUID=1000 +PHP_FPM_PGID=1000 + ### PHP_WORKER ############################################ PHP_WORKER_INSTALL_PGSQL=false diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 3e39d2ec..4a0fcc8a 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -759,7 +759,14 @@ RUN apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ rm /var/log/lastlog /var/log/faillog -RUN usermod -u 1000 www-data +# Configure non-root user. +ARG PUID=1000 +ENV PUID ${PUID} +ARG PGID=1000 +ENV PGID ${PGID} + +RUN groupmod -o -g ${PGID} www-data && \ + usermod -o -u ${PUID} -g www-data www-data # Adding the faketime library to the preload file needs to be done last # otherwise it will preload it for all commands that follow in this file From 902e041f7beb067400eb601c847724d7dddd5186 Mon Sep 17 00:00:00 2001 From: Aaron Stone Date: Wed, 2 Oct 2019 11:57:23 -0700 Subject: [PATCH 15/55] 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 16/55] 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 17/55] 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 18/55] 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 19/55] 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 20/55] 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 21/55] 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 3cb43e613925ebe3278578562a7cec514859f298 Mon Sep 17 00:00:00 2001 From: Fernando Larios Date: Tue, 8 Oct 2019 13:35:55 -0600 Subject: [PATCH 22/55] add gettext extensio php-fpm --- docker-compose.yml | 1 + env-example | 3 ++- php-fpm/Dockerfile | 11 +++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 896adb59..a3f4f2da 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -187,6 +187,7 @@ services: - INSTALL_APCU=${PHP_FPM_INSTALL_APCU} - INSTALL_YAML=${PHP_FPM_INSTALL_YAML} - INSTALL_RDKAFKA=${PHP_FPM_INSTALL_RDKAFKA} + - INSTALL_GETTEXT=${PHP_FPM_INSTALL_GETTEXT} - INSTALL_ADDITIONAL_LOCALES=${PHP_FPM_INSTALL_ADDITIONAL_LOCALES} - INSTALL_MYSQL_CLIENT=${PHP_FPM_INSTALL_MYSQL_CLIENT} - INSTALL_PING=${PHP_FPM_INSTALL_PING} diff --git a/env-example b/env-example index 1b714796..f3afab72 100644 --- a/env-example +++ b/env-example @@ -186,6 +186,7 @@ PHP_FPM_INSTALL_CALENDAR=false PHP_FPM_INSTALL_FAKETIME=false PHP_FPM_INSTALL_IONCUBE=false PHP_FPM_INSTALL_RDKAFKA=false +PHP_FPM_INSTALL_GETTEXT=false PHP_FPM_FAKETIME=-0 PHP_FPM_INSTALL_APCU=false PHP_FPM_INSTALL_YAML=false @@ -822,4 +823,4 @@ 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 +GEARMAN_MYSQL_TABLE=gearman_queue diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index d74ef345..f03f696d 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -682,6 +682,17 @@ RUN if [ ${INSTALL_RDKAFKA} = true ]; then \ docker-php-ext-enable rdkafka \ ;fi +########################################################################### +# GETTEXT: +########################################################################### + +ARG INSTALL_GETTEXT=false + +RUN if [ ${INSTALL_GETTEXT} = true ]; then \ + apt-get install -y zlib1g-dev libicu-dev g++ libpq-dev libssl-dev gettext && \ + docker-php-ext-install gettext \ +;fi + ########################################################################### # Install additional locales: ########################################################################### From 52bd45e1b8380ce604b1ea17e1304db34a3a3e42 Mon Sep 17 00:00:00 2001 From: Fernando-Larios Date: Tue, 8 Oct 2019 14:04:12 -0600 Subject: [PATCH 23/55] Update env-example From 4dc4a4e680f247cc4f3f80fe074d11a371c00778 Mon Sep 17 00:00:00 2001 From: Fernando-Larios Date: Tue, 8 Oct 2019 14:05:03 -0600 Subject: [PATCH 24/55] Removing unnecesary spaces 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 25/55] 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 26/55] 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 27/55] 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 28/55] 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 51d821b35f527edd4c618b646a31c23a5b8bd942 Mon Sep 17 00:00:00 2001 From: zill057 Date: Mon, 28 Oct 2019 17:15:31 +0800 Subject: [PATCH 29/55] Add CHANGE_SOURCE option for php-worker --- docker-compose.yml | 1 + php-worker/Dockerfile | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 896adb59..ee00bd25 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -222,6 +222,7 @@ services: build: context: ./php-worker args: + - CHANGE_SOURCE=${CHANGE_SOURCE} - PHP_VERSION=${PHP_VERSION} - PHALCON_VERSION=${PHALCON_VERSION} - INSTALL_PGSQL=${PHP_WORKER_INSTALL_PGSQL} diff --git a/php-worker/Dockerfile b/php-worker/Dockerfile index 9bccca0e..350c40dc 100644 --- a/php-worker/Dockerfile +++ b/php-worker/Dockerfile @@ -9,6 +9,14 @@ FROM php:${PHP_VERSION}-alpine LABEL maintainer="Mahmoud Zalt " +# If you're in China, or you need to change sources, will be set CHANGE_SOURCE to true in .env. + +ARG CHANGE_SOURCE=false +RUN if [ ${CHANGE_SOURCE} = true ]; then \ + # Change application source from dl-cdn.alpinelinux.org to aliyun source + sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories \ +;fi + RUN apk --update add wget \ curl \ git \ 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 30/55] 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 31/55] 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` + + + + + +

From 7ad82a3cd1f864d21de73b513f24760b5c96a4de Mon Sep 17 00:00:00 2001 From: Anton Sannikov Date: Thu, 31 Oct 2019 11:50:39 +0300 Subject: [PATCH 32/55] Added nginx settings for confluence --- DOCUMENTATION/content/documentation/index.md | 10 +++++ nginx/sites/confluence.conf.example | 43 ++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 nginx/sites/confluence.conf.example diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index d2b91fb4..14d9e331 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -1044,6 +1044,7 @@ _Note: You can customize the port on which beanstalkd console is listening by ch
+ ## Use Confluence 1 - Run the Confluence Container (`confluence`) with the `docker-compose up` command. Example: @@ -1058,6 +1059,15 @@ docker-compose up -d confluence You can set custom confluence version in `CONFLUENCE_VERSION`. [Find more info in section 'Versioning'](https://hub.docker.com/r/atlassian/confluence-server/) + +##### Confluence usage with Nginx and SSL. + +1. Find an instance configuration file in `nginx/sites/confluence.conf.example` and replace sample domain with yours. + +2. Configure ssl keys to your domain. + +Keep in mind that Confluence is still accessible on 8090 anyway. +
## Use ElasticSearch diff --git a/nginx/sites/confluence.conf.example b/nginx/sites/confluence.conf.example new file mode 100644 index 00000000..f804956b --- /dev/null +++ b/nginx/sites/confluence.conf.example @@ -0,0 +1,43 @@ +server { + listen 80; + listen [::]:80; + server_name www.confluence-domain.com; + rewrite ^(.*) https://confluence-domain.com$1/ permanent; +} + +server { + listen 80; + listen [::]:80; + server_name confluence-domain.com; + rewrite ^(.*) https://confluence-domain.com/ permanent; +} + +server { + listen 443 ssl; + listen [::]:443 ssl; + ssl_certificate /etc/nginx/ssl/confluence-domain.com.crt; + ssl_certificate_key /etc/nginx/ssl/confluence-domain.com.key; + + server_name confluence-domain.com; + + location / { + client_max_body_size 100m; + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Server $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://confluence-domain.com:8090/; + } + + location /synchrony { + proxy_set_header X-Forwarded-Host $host; + proxy_set_header X-Forwarded-Server $host; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_pass http://confluence-domain.com:8090/synchrony-proxy; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + } + + error_log /var/log/nginx/bookchangerru_error.log; + access_log /var/log/nginx/bookchangerru_access.log; +} From 402ea8747a020590ccc7c5a8606fb3f212e0b7b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BAnior=20Ara=C3=BAjo?= Date: Fri, 1 Nov 2019 14:35:23 -0300 Subject: [PATCH 33/55] Install MongoDB drivers --- laravel-horizon/Dockerfile | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/laravel-horizon/Dockerfile b/laravel-horizon/Dockerfile index 5ce1d8ef..425499d6 100644 --- a/laravel-horizon/Dockerfile +++ b/laravel-horizon/Dockerfile @@ -74,6 +74,12 @@ RUN if [ ${INSTALL_CASSANDRA} = true ]; then \ && docker-php-ext-enable cassandra \ ;fi +# Install MongoDB drivers: +ARG INSTALL_MONGO=false +RUN if [ ${INSTALL_MONGO} = true ]; then \ + pecl install mongodb \ + && docker-php-ext-enable mongodb \ + ;fi ########################################################################### From 10c28a14fa5ec044ce55e6aeaead6f296c62575b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=85=8B?= Date: Sat, 2 Nov 2019 21:19:37 +0800 Subject: [PATCH 34/55] Use default user --- DOCUMENTATION/content/documentation/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DOCUMENTATION/content/documentation/index.md b/DOCUMENTATION/content/documentation/index.md index d83b4422..0e01cec7 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -76,7 +76,7 @@ docker-compose exec mysql bash *Example: enter to MySQL prompt within MySQL container* ```bash -docker-compose exec mysql mysql -u homestead -psecret +docker-compose exec mysql mysql -udefault -psecret ``` 3 - To exit a container, type `exit`. @@ -1575,7 +1575,7 @@ The default username and password for the root MySQL user are `root` and `root ` 1 - Enter the MySQL container: `docker-compose exec mysql bash`. -2 - Enter mysql: `mysql -uroot -proot` for non root access use `mysql -uhomestead -psecret`. +2 - Enter mysql: `mysql -uroot -proot` for non root access use `mysql -udefault -psecret`. 3 - See all users: `SELECT User FROM mysql.user;` From c6ad0a1a2d7d7c02b2a11f8733c5be6554e0fca5 Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Wed, 13 Nov 2019 19:58:39 +0100 Subject: [PATCH 35/55] Remove a dead link from the documentation --- DOCUMENTATION/content/introduction/index.md | 1 - README.md | 1 - 2 files changed, 2 deletions(-) diff --git a/DOCUMENTATION/content/introduction/index.md b/DOCUMENTATION/content/introduction/index.md index fc4f6241..0505d981 100644 --- a/DOCUMENTATION/content/introduction/index.md +++ b/DOCUMENTATION/content/introduction/index.md @@ -36,7 +36,6 @@ Supporting a variety of common services, all pre-configured to provide a full PH ## Sponsors - diff --git a/README.md b/README.md index 3e794ffc..09c7c489 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,6 @@ Contribute and help us sustain the project. ## Sponsors - From 4e5a142c9d89e6b5d9f3186fa86cbbd6142e8070 Mon Sep 17 00:00:00 2001 From: Valentino Lauciani Date: Wed, 13 Nov 2019 23:08:54 +0100 Subject: [PATCH 36/55] YAML extension for php-cli (#2360) * Add 'WORKSPACE_INSTALL_YAML' variable to install php yaml extension for php-cli * Set 'INSTALL_YAML' variable to install php yaml extension for php-cli * Install yaml extension for php-cli --- docker-compose.yml | 1 + env-example | 3 ++- workspace/Dockerfile | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0bc79725..d2152543 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -110,6 +110,7 @@ services: - INSTALL_MYSQL_CLIENT=${WORKSPACE_INSTALL_MYSQL_CLIENT} - INSTALL_PING=${WORKSPACE_INSTALL_PING} - INSTALL_SSHPASS=${WORKSPACE_INSTALL_SSHPASS} + - INSTALL_YAML=${WORKSPACE_INSTALL_YAML} - INSTALL_MAILPARSE=${WORKSPACE_INSTALL_MAILPARSE} - PUID=${WORKSPACE_PUID} - PGID=${WORKSPACE_PGID} diff --git a/env-example b/env-example index 673deb0a..a52f36ef 100644 --- a/env-example +++ b/env-example @@ -140,6 +140,7 @@ WORKSPACE_INSTALL_PING=false WORKSPACE_INSTALL_SSHPASS=false WORKSPACE_INSTALL_INOTIFY=false WORKSPACE_INSTALL_FSWATCH=false +WORKSPACE_INSTALL_YAML=false WORKSPACE_INSTALL_MAILPARSE=false WORKSPACE_PUID=1000 WORKSPACE_PGID=1000 @@ -826,4 +827,4 @@ 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 +GEARMAN_MYSQL_TABLE=gearman_queue diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 8a1d4c9d..58bd4633 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -1101,6 +1101,25 @@ RUN if [ ${INSTALL_SSHPASS} = true ]; then \ apt-get -y install sshpass \ ;fi +########################################################################### +# YAML: extension for PHP-CLI +########################################################################### + +USER root + +ARG INSTALL_YAML=false + +RUN if [ ${INSTALL_YAML} = true ]; then \ + apt-get install libyaml-dev -y ; \ + if [ $(php -r "echo PHP_MAJOR_VERSION;") = "5" ]; then \ + pecl install -a yaml-1.3.2; \ + else \ + pecl install yaml; \ + fi && \ + echo "extension=yaml.so" >> /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini && \ + ln -s /etc/php/${LARADOCK_PHP_VERSION}/mods-available/yaml.ini /etc/php/${LARADOCK_PHP_VERSION}/cli/conf.d/35-yaml.ini \ +;fi + ########################################################################### # FFMpeg: ########################################################################### From c3620e95c8c6174f07c593e7fee3c7a6b2bdc1d7 Mon Sep 17 00:00:00 2001 From: StefanT123 Date: Wed, 13 Nov 2019 23:22:41 +0100 Subject: [PATCH 37/55] Volumes are created on every docker start (#2247) * Added graylog to the list of softwares. * Added persistent volumes for docker-in-docker and graylog. Added volume for mongo configdb. These services were making volumes on every start, so we might end up with many unnecessary volumes. With this pull request this issue is resolved. --- docker-compose.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index d2152543..4f32e05b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -47,6 +47,10 @@ volumes: driver: ${VOLUMES_DRIVER} cassandra: driver: ${VOLUMES_DRIVER} + graylog: + driver: ${VOLUMES_DRIVER} + dind: + driver: ${VOLUMES_DRIVER} services: @@ -503,6 +507,7 @@ services: - "${MONGODB_PORT}:27017" volumes: - ${DATA_PATH_HOST}/mongo:/data/db + - ${DATA_PATH_HOST}/mongo_config:/data/configdb networks: - backend @@ -936,9 +941,9 @@ services: - ${GRAYLOG_GELF_TCP_PORT}:12201 # GELF UDP - ${GRAYLOG_GELF_UDP_PORT}:12201/udp - user: root + user: graylog volumes: - - ./graylog/config:/usr/share/graylog/data/config + - ${DATA_PATH_HOST}/graylog:/usr/share/graylog/data networks: - backend @@ -1218,6 +1223,7 @@ services: privileged: true volumes: - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER} + - ${DATA_PATH_HOST}/dind:/var/lib/docker expose: - 2375 networks: From 07c019b672bcac8d6d6fffb13f70512e4247c7ba Mon Sep 17 00:00:00 2001 From: Joe Sweeney Date: Wed, 13 Nov 2019 22:10:41 -0700 Subject: [PATCH 38/55] Fix confluence / postgres init --- postgres/docker-entrypoint-initdb.d/init_confluence_db.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/postgres/docker-entrypoint-initdb.d/init_confluence_db.sh b/postgres/docker-entrypoint-initdb.d/init_confluence_db.sh index ce5e9f72..aa744a1b 100644 --- a/postgres/docker-entrypoint-initdb.d/init_confluence_db.sh +++ b/postgres/docker-entrypoint-initdb.d/init_confluence_db.sh @@ -33,7 +33,7 @@ # EOSQL # ### default database and user for confluence ############################################## -if [ "$POSTGRES_CONFLUENCE_INIT" == 'true' ]; then +if [ "$CONFLUENCE_POSTGRES_INIT" == 'true' ]; then psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL CREATE USER $POSTGRES_CONFLUENCE_USER WITH PASSWORD '$POSTGRES_CONFLUENCE_PASSWORD'; CREATE DATABASE $POSTGRES_CONFLUENCE_DB; @@ -41,4 +41,4 @@ if [ "$POSTGRES_CONFLUENCE_INIT" == 'true' ]; then ALTER ROLE $POSTGRES_CONFLUENCE_USER CREATEROLE SUPERUSER; EOSQL echo -fi \ No newline at end of file +fi From d3e505cd73a9ed44373b0efdb69aa15a096f687a Mon Sep 17 00:00:00 2001 From: Lan Phan Date: Thu, 14 Nov 2019 22:34:23 +0700 Subject: [PATCH 39/55] remove duplicated laravel installer code --- workspace/Dockerfile | 7 ------- 1 file changed, 7 deletions(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 58bd4633..4bef4dfc 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -777,13 +777,6 @@ RUN if [ ${COMPOSER_REPO_PACKAGIST} ]; then \ composer config -g repo.packagist composer ${COMPOSER_REPO_PACKAGIST} \ ;fi -ARG INSTALL_LARAVEL_INSTALLER=false - -RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \ - # Install the Laravel Installer - composer global require "laravel/installer" \ -;fi - ########################################################################### # Deployer: ########################################################################### From 440002f0fc861ffad21ea6b4fbce12becc11d376 Mon Sep 17 00:00:00 2001 From: bkarstaedt Date: Fri, 15 Nov 2019 09:52:48 +0100 Subject: [PATCH 40/55] Update to Kibana 7.1.1 When spinning up the stack via `docker-compose -d apache2 elasticsearch kibana` Kibana won't work currently and displays "kibana is not ready yet". `docker-compose logs kibana` the message: ``` {"type":"log","@timestamp":"2019-11-14T15:46:37Z","tags":["status","plugin:reporting@6.6.0","error"],"pid":1,"state":"red","message":"Status changed from uninitialized to red - This version of Kibana requires Elasticsearch v6.6.0 on all nodes. I found the following incompatible nodes in your cluster: v7.1.1 @ 172.26.0.3:9200 (172.26.0.3)","prevState":"uninitialized","prevMsg":"uninitialized"} ``` I update the version to align with elasticsearchs' version which works fine on my machine. --- kibana/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kibana/Dockerfile b/kibana/Dockerfile index badfd80a..b831d6d0 100644 --- a/kibana/Dockerfile +++ b/kibana/Dockerfile @@ -1,3 +1,3 @@ -FROM docker.elastic.co/kibana/kibana:6.6.0 +FROM docker.elastic.co/kibana/kibana:7.1.1 EXPOSE 5601 From aff7d9d615cd2aba00d9f2f1b8d03d1f643268a2 Mon Sep 17 00:00:00 2001 From: alone <794000949@qq.com> Date: Mon, 18 Nov 2019 03:05:13 +0800 Subject: [PATCH 41/55] add nvm NVM_NODEJS_ORG_MIRROR --- docker-compose.yml | 1 + env-example | 1 + workspace/Dockerfile | 1 + 3 files changed, 3 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 4f32e05b..41a4aeae 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -77,6 +77,7 @@ services: - INSTALL_GEARMAN=${WORKSPACE_INSTALL_GEARMAN} - INSTALL_PHPREDIS=${WORKSPACE_INSTALL_PHPREDIS} - INSTALL_MSSQL=${WORKSPACE_INSTALL_MSSQL} + - NVM_NODEJS_ORG_MIRROR=${WORKSPACE_NVM_NODEJS_ORG_MIRROR} - INSTALL_NODE=${WORKSPACE_INSTALL_NODE} - NPM_REGISTRY=${WORKSPACE_NPM_REGISTRY} - INSTALL_YARN=${WORKSPACE_INSTALL_YARN} diff --git a/env-example b/env-example index a52f36ef..cdc3874b 100644 --- a/env-example +++ b/env-example @@ -84,6 +84,7 @@ DOCKER_SYNC_STRATEGY=native_osx WORKSPACE_COMPOSER_GLOBAL_INSTALL=true WORKSPACE_COMPOSER_AUTH=false WORKSPACE_COMPOSER_REPO_PACKAGIST= +WORKSPACE_NVM_NODEJS_ORG_MIRROR= WORKSPACE_INSTALL_NODE=true WORKSPACE_NODE_VERSION=node WORKSPACE_NPM_REGISTRY= diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 58bd4633..28ff0a6c 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -580,6 +580,7 @@ ARG INSTALL_NPM_ANGULAR_CLI=false ARG NPM_REGISTRY ENV NPM_REGISTRY ${NPM_REGISTRY} ENV NVM_DIR /home/laradock/.nvm +ENV NVM_NODEJS_ORG_MIRROR=${NVM_NODEJS_ORG_MIRROR} RUN if [ ${INSTALL_NODE} = true ]; then \ # Install nvm (A Node Version Manager) From 461e05d677cff58b7e1727caa7ff0f2bb390a5b6 Mon Sep 17 00:00:00 2001 From: alone <794000949@qq.com> Date: Mon, 18 Nov 2019 03:24:27 +0800 Subject: [PATCH 42/55] change workspace ubuntu sources.list file --- workspace/Dockerfile | 9 +++++ workspace/sources.sh | 81 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100755 workspace/sources.sh diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 28ff0a6c..f9b3ec6d 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -36,6 +36,15 @@ ENV PUID ${PUID} ARG PGID=1000 ENV PGID ${PGID} +COPY ./sources.sh /tmp/sources.sh + +RUN if [ ${CHANGE_SOURCE} = true ]; then \ + chmod +x /tmp/sources.sh && \ + # bash /tmp/sources.sh aliyun + # ./tmp/sources.sh aliyun + /bin/bash /tmp/sources.sh aliyun && \ +;fi + # always run apt update when start and after add new source list, then clean up at end. RUN set -xe; \ apt-get update -yqq && \ diff --git a/workspace/sources.sh b/workspace/sources.sh new file mode 100755 index 00000000..61da3a24 --- /dev/null +++ b/workspace/sources.sh @@ -0,0 +1,81 @@ +#!/bin/bash + +if type "tee" 2>/dev/null && [ -n "$1" ]; then + SOURCE_PATH="/etc/apt/sources.list" + cp ${SOURCE_PATH} ${SOURCE_PATH}.bak && rm -rf ${SOURCE_PATH} + case "$1" in + "aliyun") + tee ${SOURCE_PATH} <<-'EOF' +deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse +EOF +;; + "zju") + tee ${SOURCE_PATH} <<-'EOF' +deb http://mirrors.zju.edu.cn/ubuntu/ bionic main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-security main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-security main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe +EOF +;; + "tsinghua") + tee ${SOURCE_PATH} <<-'EOF' +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +EOF +;; + "163") + tee ${SOURCE_PATH} <<-'EOF' +deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse +EOF +;; + "ustc") + tee ${SOURCE_PATH} <<-'EOF' +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +EOF +;; + *) + echo "Please check whether there is aliyun|zju|tsinghua|163|ustc in the parameter" + exit 1;; + esac +fi \ No newline at end of file From 24361ca818ca41577d8f8de4966b36de84445002 Mon Sep 17 00:00:00 2001 From: alone <794000949@qq.com> Date: Sat, 30 Nov 2019 08:51:23 +0800 Subject: [PATCH 43/55] add ubuntu sources.list --- docker-compose.yml | 3 ++ env-example | 2 ++ workspace/Dockerfile | 8 ++--- workspace/sources.sh | 81 -------------------------------------------- 4 files changed, 9 insertions(+), 85 deletions(-) delete mode 100755 workspace/sources.sh diff --git a/docker-compose.yml b/docker-compose.yml index 41a4aeae..d1fde5c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -133,6 +133,8 @@ services: - http_proxy - https_proxy - no_proxy + - CHANGE_SOURCE=${CHANGE_SOURCE} + - UBUNTU_SOURCE=${UBUNTU_SOURCE} volumes: - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG} - ./php-worker/supervisord.d:/etc/supervisord.d @@ -156,6 +158,7 @@ services: context: ./php-fpm args: - CHANGE_SOURCE=${CHANGE_SOURCE} + - UBUNTU_SOURCE=${UBUNTU_SOURCE} - LARADOCK_PHP_VERSION=${PHP_VERSION} - LARADOCK_PHALCON_VERSION=${PHALCON_VERSION} - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} diff --git a/env-example b/env-example index cdc3874b..aee4d62d 100644 --- a/env-example +++ b/env-example @@ -69,6 +69,8 @@ COMPOSE_CONVERT_WINDOWS_PATHS=1 # If you need to change the sources (i.e. to China), set CHANGE_SOURCE to true CHANGE_SOURCE=false +# Set CHANGE_SOURCE and UBUNTU_SOURCE option if you want to change the Ubuntu system sources.list file. +UBUNTU_SOURCE=aliyun ### Docker Sync ########################################### diff --git a/workspace/Dockerfile b/workspace/Dockerfile index d38bb167..a997e080 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -36,13 +36,13 @@ ENV PUID ${PUID} ARG PGID=1000 ENV PGID ${PGID} +ARG CHANGE_SOURCE=false +ARG UBUNTU_SOURCE COPY ./sources.sh /tmp/sources.sh RUN if [ ${CHANGE_SOURCE} = true ]; then \ - chmod +x /tmp/sources.sh && \ - # bash /tmp/sources.sh aliyun - # ./tmp/sources.sh aliyun - /bin/bash /tmp/sources.sh aliyun && \ + /bin/sh -c /tmp/sources.sh ${UBUNTU_SOURCE} && \ + rm -rf /tmp/sources.sh \ ;fi # always run apt update when start and after add new source list, then clean up at end. diff --git a/workspace/sources.sh b/workspace/sources.sh deleted file mode 100755 index 61da3a24..00000000 --- a/workspace/sources.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -if type "tee" 2>/dev/null && [ -n "$1" ]; then - SOURCE_PATH="/etc/apt/sources.list" - cp ${SOURCE_PATH} ${SOURCE_PATH}.bak && rm -rf ${SOURCE_PATH} - case "$1" in - "aliyun") - tee ${SOURCE_PATH} <<-'EOF' -deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse -deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse -deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse -deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse -deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse -deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse -EOF -;; - "zju") - tee ${SOURCE_PATH} <<-'EOF' -deb http://mirrors.zju.edu.cn/ubuntu/ bionic main multiverse restricted universe -deb http://mirrors.zju.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe -deb http://mirrors.zju.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe -deb http://mirrors.zju.edu.cn/ubuntu/ bionic-security main multiverse restricted universe -deb http://mirrors.zju.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-security main multiverse restricted universe -deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe -EOF -;; - "tsinghua") - tee ${SOURCE_PATH} <<-'EOF' -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse -deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse -deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse -EOF -;; - "163") - tee ${SOURCE_PATH} <<-'EOF' -deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse -deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse -deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse -deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse -deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse -deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse -EOF -;; - "ustc") - tee ${SOURCE_PATH} <<-'EOF' -deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse -deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse -deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse -deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse -deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse -deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse -EOF -;; - *) - echo "Please check whether there is aliyun|zju|tsinghua|163|ustc in the parameter" - exit 1;; - esac -fi \ No newline at end of file From c64be9969fb957f95c55e4e83c995660fcaf7a0b Mon Sep 17 00:00:00 2001 From: alone <794000949@qq.com> Date: Sat, 30 Nov 2019 08:54:29 +0800 Subject: [PATCH 44/55] delete php-fpm args UBUNTU_SOURCE --- docker-compose.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index d1fde5c7..1e61eb4c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -158,7 +158,6 @@ services: context: ./php-fpm args: - CHANGE_SOURCE=${CHANGE_SOURCE} - - UBUNTU_SOURCE=${UBUNTU_SOURCE} - LARADOCK_PHP_VERSION=${PHP_VERSION} - LARADOCK_PHALCON_VERSION=${PHALCON_VERSION} - INSTALL_XDEBUG=${PHP_FPM_INSTALL_XDEBUG} From fe2631649cf23e18894101c6548d76f5cb025ee6 Mon Sep 17 00:00:00 2001 From: alone <794000949@qq.com> Date: Sat, 30 Nov 2019 09:06:09 +0800 Subject: [PATCH 45/55] add sources.sh for workspace --- workspace/sources.sh | 83 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100755 workspace/sources.sh diff --git a/workspace/sources.sh b/workspace/sources.sh new file mode 100755 index 00000000..eef06706 --- /dev/null +++ b/workspace/sources.sh @@ -0,0 +1,83 @@ +#!/bin/bash + +set -xe; + +if type "tee" 2>/dev/null && [ -n "${UBUNTU_SOURCE}" ]; then + SOURCE_PATH="/etc/apt/sources.list" + cp ${SOURCE_PATH} ${SOURCE_PATH}.bak && rm -rf ${SOURCE_PATH} + case "${UBUNTU_SOURCE}" in + "aliyun") + tee ${SOURCE_PATH} <<-'EOF' +deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse +EOF +;; + "zju") + tee ${SOURCE_PATH} <<-'EOF' +deb http://mirrors.zju.edu.cn/ubuntu/ bionic main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-security main multiverse restricted universe +deb http://mirrors.zju.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-backports main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-proposed main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-security main multiverse restricted universe +deb-src http://mirrors.zju.edu.cn/ubuntu/ bionic-updates main multiverse restricted universe +EOF +;; + "tsinghua") + tee ${SOURCE_PATH} <<-'EOF' +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +EOF +;; + "163") + tee ${SOURCE_PATH} <<-'EOF' +deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse +EOF +;; + "ustc") + tee ${SOURCE_PATH} <<-'EOF' +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse +deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse +EOF +;; + *) + echo "Please check whether there is aliyun|zju|tsinghua|163|ustc in the parameter" + exit 1;; + esac +fi \ No newline at end of file From 919cfc0c87c07725756c848a81bbe615de98b312 Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Sat, 30 Nov 2019 18:26:16 +0800 Subject: [PATCH 46/55] increase update filesize to 2G #2344 --- phpmyadmin/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpmyadmin/Dockerfile b/phpmyadmin/Dockerfile index 75812d9b..ded59baf 100644 --- a/phpmyadmin/Dockerfile +++ b/phpmyadmin/Dockerfile @@ -5,5 +5,10 @@ LABEL maintainer="Bo-Yi Wu " # Add volume for sessions to allow session persistence VOLUME /sessions +RUN echo '' >> /usr/local/etc/php/conf.d/php-phpmyadmin.ini \ + && echo '[PHP]' >> /usr/local/etc/php/conf.d/php-phpmyadmin.ini \ + && echo 'post_max_size = 2G' >> /usr/local/etc/php/conf.d/php-phpmyadmin.ini \ + && echo 'upload_max_filesize = 2G' >> /usr/local/etc/php/conf.d/php-phpmyadmin.ini + # We expose phpMyAdmin on port 80 EXPOSE 80 From 497878557c9ed4663237e902ed12d63888638ef5 Mon Sep 17 00:00:00 2001 From: alone <794000949@qq.com> Date: Sun, 1 Dec 2019 00:02:59 +0800 Subject: [PATCH 47/55] Remove the sources.sh Ubuntu_Source parameter --- workspace/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workspace/Dockerfile b/workspace/Dockerfile index a997e080..f4514578 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -41,7 +41,7 @@ ARG UBUNTU_SOURCE COPY ./sources.sh /tmp/sources.sh RUN if [ ${CHANGE_SOURCE} = true ]; then \ - /bin/sh -c /tmp/sources.sh ${UBUNTU_SOURCE} && \ + /bin/sh -c /tmp/sources.sh && \ rm -rf /tmp/sources.sh \ ;fi From f5f1f458586a96521e21591f87c14f1000021a3e Mon Sep 17 00:00:00 2001 From: Vladyslav Startsev Date: Tue, 3 Dec 2019 12:53:42 +0200 Subject: [PATCH 48/55] added cachetool to invalidate shared php cache (APCu, OPcache) without reloading PHP-FPM --- docker-compose.yml | 1 + env-example | 1 + php-fpm/Dockerfile | 16 ++++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 4f32e05b..8e84141a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -192,6 +192,7 @@ services: - INSTALL_FAKETIME=${PHP_FPM_INSTALL_FAKETIME} - INSTALL_IONCUBE=${PHP_FPM_INSTALL_IONCUBE} - INSTALL_APCU=${PHP_FPM_INSTALL_APCU} + - INSTALL_CACHETOOL=${PHP_FPM_INSTALL_CACHETOOL} - INSTALL_YAML=${PHP_FPM_INSTALL_YAML} - INSTALL_RDKAFKA=${PHP_FPM_INSTALL_RDKAFKA} - INSTALL_ADDITIONAL_LOCALES=${PHP_FPM_INSTALL_ADDITIONAL_LOCALES} diff --git a/env-example b/env-example index a52f36ef..f3d51ce6 100644 --- a/env-example +++ b/env-example @@ -190,6 +190,7 @@ PHP_FPM_INSTALL_IONCUBE=false PHP_FPM_INSTALL_RDKAFKA=false PHP_FPM_FAKETIME=-0 PHP_FPM_INSTALL_APCU=false +PHP_FPM_INSTALL_CACHETOOL=false PHP_FPM_INSTALL_YAML=false PHP_FPM_INSTALL_ADDITIONAL_LOCALES=false PHP_FPM_INSTALL_MYSQL_CLIENT=false diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 20474893..01f025b7 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -767,6 +767,22 @@ RUN if [ ${INSTALL_MAILPARSE} = true ]; then \ && docker-php-ext-enable mailparse \ ;fi +########################################################################### +# CacheTool: +########################################################################### + +ARG INSTALL_CACHETOOL=false + +RUN if [ ${INSTALL_CACHETOOL} = true ]; then \ + if [ $(php -r "echo PHP_MAJOR_VERSION;") = "7" ] && [ $(php -r "echo PHP_MINOR_VERSION;") -ge 1 ]; then \ + curl -sO http://gordalina.github.io/cachetool/downloads/cachetool.phar; \ + else \ + curl http://gordalina.github.io/cachetool/downloads/cachetool-3.2.1.phar -o cachetool.phar; \ + fi && \ + chmod +x cachetool.phar && \ + mv cachetool.phar /usr/local/bin/cachetool \ +;fi + ########################################################################### # Check PHP version: ########################################################################### From abdcfa10029a1c7235ddcc3ee6f86dd534df08d9 Mon Sep 17 00:00:00 2001 From: Bagus Erlang Date: Wed, 4 Dec 2019 15:38:52 +0800 Subject: [PATCH 49/55] Update index.md --- 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 a8bdcb86..e0e88282 100644 --- a/DOCUMENTATION/content/documentation/index.md +++ b/DOCUMENTATION/content/documentation/index.md @@ -536,7 +536,7 @@ Note: Should add `--user=laradock` (example `docker-compose exec --user=laradock php artisan ``` ```bash -Composer update +composer update ``` ```bash phpunit From 351f19b8fe3a9839ba0c63bfc5234f17402371c1 Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Wed, 4 Dec 2019 23:02:35 +0800 Subject: [PATCH 50/55] support PHP 7.4, #2387. --- php-fpm/Dockerfile | 2 +- workspace/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 20474893..73cf44fd 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -14,7 +14,7 @@ ARG LARADOCK_PHP_VERSION -FROM laradock/php-fpm:2.5-${LARADOCK_PHP_VERSION} +FROM laradock/php-fpm:2.6.1-${LARADOCK_PHP_VERSION} LABEL maintainer="Mahmoud Zalt " diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 4bef4dfc..0be87f8d 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -14,7 +14,7 @@ ARG LARADOCK_PHP_VERSION -FROM laradock/workspace:2.5-${LARADOCK_PHP_VERSION} +FROM laradock/workspace:2.6.1-${LARADOCK_PHP_VERSION} LABEL maintainer="Mahmoud Zalt " From 9e5ff1888e50c12437c78628b7e5d7d6d060a72f Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Thu, 5 Dec 2019 10:29:08 +0800 Subject: [PATCH 51/55] update document --- DOCUMENTATION/content/introduction/index.md | 2 +- env-example | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DOCUMENTATION/content/introduction/index.md b/DOCUMENTATION/content/introduction/index.md index 0505d981..85115551 100644 --- a/DOCUMENTATION/content/introduction/index.md +++ b/DOCUMENTATION/content/introduction/index.md @@ -12,7 +12,7 @@ Supporting a variety of common services, all pre-configured to provide a full PH ## Features -- Easy switch between PHP versions: 7.3, 7.2, 7.1, 5.6... +- Easy switch between PHP versions: 7.4, 7.3, 7.2, 7.1, 5.6... - Choose your favorite database engine: MySQL, Postgres, MariaDB... - Run your own stack: Memcached, HHVM, RabbitMQ... - Each software runs on its own container: PHP-FPM, NGINX, PHP-CLI... diff --git a/env-example b/env-example index a52f36ef..9e25ea5b 100644 --- a/env-example +++ b/env-example @@ -37,7 +37,8 @@ COMPOSE_PROJECT_NAME=laradock ### PHP Version ########################################### -# Select a PHP version of the Workspace and PHP-FPM containers (Does not apply to HHVM). Accepted values: 7.3 - 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.4 - 7.3 - 7.2 - 7.1 - 7.0 - 5.6 PHP_VERSION=7.3 ### Phalcon Version ########################################### From 4afc747bf5fee439a6377532c2ce3d135f49d2cd Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Thu, 5 Dec 2019 10:46:24 +0800 Subject: [PATCH 52/55] Update docker-compose.yml --- docker-compose.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/docker-compose.yml b/docker-compose.yml index 896adb59..362ebb67 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -262,6 +262,7 @@ services: - INSTALL_SOCKETS=${LARAVEL_HORIZON_INSTALL_SOCKETS} - INSTALL_CASSANDRA=${PHP_FPM_INSTALL_CASSANDRA} - INSTALL_PHPREDIS=${LARAVEL_HORIZON_INSTALL_PHPREDIS} + - INSTALL_MONGO=${LARAVEL_HORIZON_INSTALL_MONGO} volumes: - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER} - ./laravel-horizon/supervisord.d:/etc/supervisord.d From 8474acdf17ce8f6397d91e48b2e472490a991d0c Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Thu, 5 Dec 2019 10:47:31 +0800 Subject: [PATCH 53/55] Update env-example --- env-example | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/env-example b/env-example index 1b714796..f021aaa6 100644 --- a/env-example +++ b/env-example @@ -232,6 +232,7 @@ NGINX_SSL_PATH=./nginx/ssl/ LARAVEL_HORIZON_INSTALL_SOCKETS=false LARAVEL_HORIZON_INSTALL_PHPREDIS=true +LARAVEL_HORIZON_INSTALL_MONGO=false ### APACHE ################################################ @@ -822,4 +823,4 @@ 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 +GEARMAN_MYSQL_TABLE=gearman_queue From ed6be69cc1f6e02e234037f4eabe3000bb6a98a1 Mon Sep 17 00:00:00 2001 From: Bagus Erlang Date: Fri, 6 Dec 2019 03:50:41 +0800 Subject: [PATCH 54/55] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 09c7c489..53e29e0a 100644 --- a/README.md +++ b/README.md @@ -156,7 +156,7 @@ Laradock exists thanks to all the people who contribute. ### Code Contributors - + ### Financial Contributors From 9cea74dc6ffed71a28dc2b54252aba0c834a514b Mon Sep 17 00:00:00 2001 From: "Shao Yu-Lung (Allen)" Date: Fri, 6 Dec 2019 19:17:22 +0800 Subject: [PATCH 55/55] update travis ci config (#2409) --- .travis.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8d92a02b..821b0f62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,20 +12,23 @@ env: - PHP_VERSION=7.1 BUILD_SERVICE=workspace - PHP_VERSION=7.2 BUILD_SERVICE=workspace - PHP_VERSION=7.3 BUILD_SERVICE=workspace + - PHP_VERSION=7.4 BUILD_SERVICE=workspace - PHP_VERSION=5.6 BUILD_SERVICE=php-fpm - PHP_VERSION=7.0 BUILD_SERVICE=php-fpm - PHP_VERSION=7.1 BUILD_SERVICE=php-fpm - PHP_VERSION=7.2 BUILD_SERVICE=php-fpm - PHP_VERSION=7.3 BUILD_SERVICE=php-fpm + - PHP_VERSION=7.4 BUILD_SERVICE=php-fpm - PHP_VERSION=hhvm BUILD_SERVICE=hhvm # - PHP_VERSION=5.6 BUILD_SERVICE=php-worker - - PHP_VERSION=7.0 BUILD_SERVICE=php-worker - - PHP_VERSION=7.1 BUILD_SERVICE=php-worker - - PHP_VERSION=7.2 BUILD_SERVICE=php-worker - - PHP_VERSION=7.3 BUILD_SERVICE=php-worker + - PHP_VERSION=7.0 BUILD_SERVICE="php-worker laravel-horizon" + - PHP_VERSION=7.1 BUILD_SERVICE="php-worker laravel-horizon" + - PHP_VERSION=7.2 BUILD_SERVICE="php-worker laravel-horizon" + - PHP_VERSION=7.3 BUILD_SERVICE="php-worker laravel-horizon" + - PHP_VERSION=7.4 BUILD_SERVICE="php-worker laravel-horizon" - PHP_VERSION=NA BUILD_SERVICE=solr - PHP_VERSION=NA BUILD_SERVICE="mssql rethinkdb aerospike"