From 9e81f92d583fb6812d1bae998250fe5ba1081579 Mon Sep 17 00:00:00 2001 From: avenli Date: Wed, 24 May 2017 14:47:12 +0800 Subject: [PATCH 01/11] fix mongodb php extension config --- workspace/Dockerfile-56 | 3 ++- workspace/Dockerfile-70 | 3 ++- workspace/Dockerfile-71 | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/workspace/Dockerfile-56 b/workspace/Dockerfile-56 index 42d0256b..9b2239e6 100644 --- a/workspace/Dockerfile-56 +++ b/workspace/Dockerfile-56 @@ -186,7 +186,8 @@ ENV INSTALL_MONGO ${INSTALL_MONGO} RUN if [ ${INSTALL_MONGO} = true ]; then \ # Install the mongodb extension pecl install mongodb && \ - echo "extension=mongodb.so" >> /etc/php/5.6/cli/conf.d/30-mongodb.ini \ + echo "extension=mongodb.so" >> /etc/php/5.6/mods-available/mongodb.ini && \ + ln -s /etc/php/5.6/mods-available/mongodb.ini /etc/php/5.6/cli/conf.d/30-mongodb.ini \ ;fi ##################################### diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index 9c7d5627..e19c041a 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -186,7 +186,8 @@ ENV INSTALL_MONGO ${INSTALL_MONGO} RUN if [ ${INSTALL_MONGO} = true ]; then \ # Install the mongodb extension pecl install mongodb && \ - echo "extension=mongodb.so" >> /etc/php/7.0/cli/conf.d/30-mongodb.ini \ + echo "extension=mongodb.so" >> /etc/php/7.0/mods-available/mongodb.ini && \ + ln -s /etc/php/7.0/mods-available/mongodb.ini /etc/php/7.0/cli/conf.d/30-mongodb.ini \ ;fi ##################################### diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index 71d865b3..d26c6358 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -182,7 +182,8 @@ ENV INSTALL_MONGO ${INSTALL_MONGO} RUN if [ ${INSTALL_MONGO} = true ]; then \ # Install the mongodb extension pecl install mongodb && \ - echo "extension=mongodb.so" >> /etc/php/7.1/cli/conf.d/30-mongodb.ini \ + echo "extension=mongodb.so" >> /etc/php/7.1/mods-available/mongodb.ini && \ + ln -s /etc/php/7.1/mods-available/mongodb.ini /etc/php/7.1/cli/conf.d/30-mongodb.ini \ ;fi ##################################### From fc8ffe573163b6f74894e51449bc474bef471506 Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Fri, 19 May 2017 19:47:57 +0800 Subject: [PATCH 02/11] using set -x could produce more debug info. --- travis-build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis-build.sh b/travis-build.sh index fa7e5773..9d47e09b 100755 --- a/travis-build.sh +++ b/travis-build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash #### halt script on error -set -e +set -xe echo '##### Print docker version' docker --version From d4caddcaeda92aa4639d2cc26254d4a9bfab2b36 Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Thu, 25 May 2017 09:56:14 +0800 Subject: [PATCH 03/11] move default config DATA_SAVE_PATH from /tmp to ~/.laradocc/data avoid lost data and windows no have /tmp folder. --- env-example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env-example b/env-example index 7397b6d0..05731550 100644 --- a/env-example +++ b/env-example @@ -10,7 +10,7 @@ APPLICATION=../ ### Data Path: # For all storage systems. -DATA_SAVE_PATH=/tmp +DATA_SAVE_PATH=~/laradock/data ### PHP version # Applies to the Workspace and PHP-FPM containers (Does not apply to HHVM) From c913c429c094f9b1b5dd81205cf931216c3869d7 Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Thu, 25 May 2017 10:04:41 +0800 Subject: [PATCH 04/11] change DATA_SAVE_PATH --- env-example | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env-example b/env-example index 05731550..a1fa108d 100644 --- a/env-example +++ b/env-example @@ -10,7 +10,7 @@ APPLICATION=../ ### Data Path: # For all storage systems. -DATA_SAVE_PATH=~/laradock/data +DATA_SAVE_PATH=~/.laradock/data ### PHP version # Applies to the Workspace and PHP-FPM containers (Does not apply to HHVM) From f3a016aa796f69d70595a8fe5375a30fe5af5ec8 Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Thu, 25 May 2017 16:44:51 +0800 Subject: [PATCH 05/11] adminer support mssql --- adminer/Dockerfile | 17 +++++++++++++++++ docker-compose.yml | 5 ++++- env-example | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/adminer/Dockerfile b/adminer/Dockerfile index 6117454f..818c8e13 100644 --- a/adminer/Dockerfile +++ b/adminer/Dockerfile @@ -8,5 +8,22 @@ MAINTAINER Patrick Artounian # Add volume for sessions to allow session persistence VOLUME /sessions +##################################### +# SQL SERVER: +##################################### +USER root +ARG INSTALL_MSSQL=false +ENV INSTALL_MSSQL ${INSTALL_MSSQL} +RUN if [ ${INSTALL_MSSQL} = true ]; then \ + set -xe \ + && apk --update add --no-cache --virtual .phpize-deps $PHPIZE_DEPS unixodbc unixodbc-dev \ + && pecl channel-update pecl.php.net \ + && pecl install pdo_sqlsrv-4.1.8preview sqlsrv-4.1.8preview \ + && echo "extension=sqlsrv.so" > /usr/local/etc/php/conf.d/20-sqlsrv.ini \ + && echo "extension=pdo_sqlsrv.so" > /usr/local/etc/php/conf.d/20-pdo_sqlsrv.ini \ +;fi + +USER adminer + # We expose Adminer on port 8080 (Adminer's default) EXPOSE 8080 diff --git a/docker-compose.yml b/docker-compose.yml index c79ba6aa..f05663c2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -440,7 +440,10 @@ services: ### Adminer Container #################################### adminer: - build: ./adminer + build: + context: ./adminer + args: + - INSTALL_MSSQL=${ADM_INSTALL_MSSQL} ports: - "${ADM_PORT}:8080" depends_on: diff --git a/env-example b/env-example index a1fa108d..7ec7e921 100644 --- a/env-example +++ b/env-example @@ -161,6 +161,7 @@ MINIO_PORT=9000 ### ADMINER ############################################################################################################ ADM_PORT=8080 +ADM_INSTALL_MSSQL=false ### PHP MY ADMIN ####################################################################################################### From f04acee6dfc3a8e2dba93f8a76cddcd73c5336ed Mon Sep 17 00:00:00 2001 From: Shao Yu Lung Date: Thu, 25 May 2017 20:04:21 +0800 Subject: [PATCH 06/11] fix jenkins permission denied --- jenkins/install-plugins.sh | 0 jenkins/jenkins-support | 0 jenkins/jenkins.sh | 0 jenkins/plugins.sh | 0 jenkins/publish.sh | 0 jenkins/update-official-library.sh | 0 6 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 jenkins/install-plugins.sh mode change 100644 => 100755 jenkins/jenkins-support mode change 100644 => 100755 jenkins/jenkins.sh mode change 100644 => 100755 jenkins/plugins.sh mode change 100644 => 100755 jenkins/publish.sh mode change 100644 => 100755 jenkins/update-official-library.sh diff --git a/jenkins/install-plugins.sh b/jenkins/install-plugins.sh old mode 100644 new mode 100755 diff --git a/jenkins/jenkins-support b/jenkins/jenkins-support old mode 100644 new mode 100755 diff --git a/jenkins/jenkins.sh b/jenkins/jenkins.sh old mode 100644 new mode 100755 diff --git a/jenkins/plugins.sh b/jenkins/plugins.sh old mode 100644 new mode 100755 diff --git a/jenkins/publish.sh b/jenkins/publish.sh old mode 100644 new mode 100755 diff --git a/jenkins/update-official-library.sh b/jenkins/update-official-library.sh old mode 100644 new mode 100755 From 5a4708085918076837cd0a10200858ce04f64d08 Mon Sep 17 00:00:00 2001 From: Lawrence Eldridge Date: Sat, 27 May 2017 14:07:45 +0100 Subject: [PATCH 07/11] This issue relates to https://github.com/laradock/laradock/issues/563, which also occurs on Mac. This has been one of the solutions proposed. --- workspace/Dockerfile-56 | 8 ++++++-- workspace/Dockerfile-70 | 8 ++++++-- workspace/Dockerfile-71 | 8 ++++++-- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/workspace/Dockerfile-56 b/workspace/Dockerfile-56 index 42d0256b..e50c830f 100644 --- a/workspace/Dockerfile-56 +++ b/workspace/Dockerfile-56 @@ -117,13 +117,17 @@ COPY ./aliases.sh /home/laradock/aliases.sh RUN echo "" >> ~/.bashrc && \ echo "# Load Custom Aliases" >> ~/.bashrc && \ echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \ - echo "" >> ~/.bashrc + echo "" >> ~/.bashrc && \ + sed -i 's/\r//' /home/laradock/aliases.sh && \ + sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh USER root RUN echo "" >> ~/.bashrc && \ echo "# Load Custom Aliases" >> ~/.bashrc && \ echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \ - echo "" >> ~/.bashrc + echo "" >> ~/.bashrc && \ + sed -i 's/\r//' /home/laradock/aliases.sh && \ + sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh ##################################### # xDebug: diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index 9c7d5627..7f551d25 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -117,13 +117,17 @@ COPY ./aliases.sh /home/laradock/aliases.sh RUN echo "" >> ~/.bashrc && \ echo "# Load Custom Aliases" >> ~/.bashrc && \ echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \ - echo "" >> ~/.bashrc + echo "" >> ~/.bashrc && \ + sed -i 's/\r//' /home/laradock/aliases.sh && \ + sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh USER root RUN echo "" >> ~/.bashrc && \ echo "# Load Custom Aliases" >> ~/.bashrc && \ echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \ - echo "" >> ~/.bashrc + echo "" >> ~/.bashrc && \ + sed -i 's/\r//' /home/laradock/aliases.sh && \ + sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh ##################################### # xDebug: diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index 71d865b3..786d43cd 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -113,13 +113,17 @@ COPY ./aliases.sh /home/laradock/aliases.sh RUN echo "" >> ~/.bashrc && \ echo "# Load Custom Aliases" >> ~/.bashrc && \ echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \ - echo "" >> ~/.bashrc + echo "" >> ~/.bashrc && \ + sed -i 's/\r//' /home/laradock/aliases.sh && \ + sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh USER root RUN echo "" >> ~/.bashrc && \ echo "# Load Custom Aliases" >> ~/.bashrc && \ echo "source /home/laradock/aliases.sh" >> ~/.bashrc && \ - echo "" >> ~/.bashrc + echo "" >> ~/.bashrc && \ + sed -i 's/\r//' /home/laradock/aliases.sh && \ + sed -i 's/^#! \/bin\/sh/#! \/bin\/bash/' /home/laradock/aliases.sh ##################################### # xDebug: From da60b32a045e72bc9fdd45616ade987806de9c97 Mon Sep 17 00:00:00 2001 From: Mirko Date: Sat, 27 May 2017 15:24:50 +0200 Subject: [PATCH 08/11] add laravel echo server --- docker-compose.yml | 14 ++++++++++++++ env-example | 4 ++++ laravel-echo-server/Dockerfile | 15 +++++++++++++++ laravel-echo-server/laravel-echo-server.json | 19 +++++++++++++++++++ laravel-echo-server/package.json | 12 ++++++++++++ 5 files changed, 64 insertions(+) create mode 100644 laravel-echo-server/Dockerfile create mode 100644 laravel-echo-server/laravel-echo-server.json create mode 100644 laravel-echo-server/package.json diff --git a/docker-compose.yml b/docker-compose.yml index f05663c2..698f2890 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -566,6 +566,7 @@ services: - proxy2 ### Jenkins ################################################### + jenkins: build: ./jenkins environment: @@ -581,6 +582,19 @@ services: - frontend - backend +### Laravel Echo Server ####################################### + laravel-echo-server: + build: + context: ./laravel-echo-server + volumes: + - ./laravel-echo-server/laravel-echo-server.json:/app/laravel-echo-server.json:ro + ports: + - "${LARAVEL_ECHO_SERVER_PORT}:6001" + links: + - redis + networks: + - frontend + - backend ### Networks Setup ############################################ diff --git a/env-example b/env-example index 7ec7e921..8ff3134b 100644 --- a/env-example +++ b/env-example @@ -240,6 +240,10 @@ CADDY_HOST_HTTPS_PORT=443 CADDY_HOST_LOG_PATH=./logs/caddy CADDY_CUSTOM_CADDYFILE=./caddy/Caddyfile +### LARAVEL ECHO SERVER ################################################################################################ + +LARAVEL_ECHO_SERVER_PORT=6001 + ##### TO BE CONTINUE ................................. diff --git a/laravel-echo-server/Dockerfile b/laravel-echo-server/Dockerfile new file mode 100644 index 00000000..5074a1f8 --- /dev/null +++ b/laravel-echo-server/Dockerfile @@ -0,0 +1,15 @@ +FROM node:argon + +# Create app directory +RUN mkdir -p /usr/src/app +WORKDIR /usr/src/app + +# Install app dependencies +COPY package.json /usr/src/app/ +RUN npm install + +# Bundle app source +COPY laravel-echo-server.json /usr/src/app/laravel-echo-server.json + +EXPOSE 3000 +CMD [ "npm", "start" ] \ No newline at end of file diff --git a/laravel-echo-server/laravel-echo-server.json b/laravel-echo-server/laravel-echo-server.json new file mode 100644 index 00000000..0a98ef90 --- /dev/null +++ b/laravel-echo-server/laravel-echo-server.json @@ -0,0 +1,19 @@ +{ + "authHost": "localhost", + "authEndpoint": "/broadcasting/auth", + "clients": [], + "database": "redis", + "databaseConfig": { + "redis": { + "port": "6379", + "host": "redis" + } + }, + "devMode": true, + "host": null, + "port": "6001", + "protocol": "http", + "socketio": {}, + "sslCertPath": "", + "sslKeyPath": "" +} \ No newline at end of file diff --git a/laravel-echo-server/package.json b/laravel-echo-server/package.json new file mode 100644 index 00000000..2784a039 --- /dev/null +++ b/laravel-echo-server/package.json @@ -0,0 +1,12 @@ +{ + "name": "laravel-echo-server-docker", + "description": "Docker container for running laravel-echo-server", + "version": "0.0.1", + "license": "MIT", + "dependencies": { + "laravel-echo-server": "^1.2.8" + }, + "scripts": { + "start": "laravel-echo-server start" + } +} \ No newline at end of file From e23ecb6a116eeec4b35cf6a82b6e54a8edbf7328 Mon Sep 17 00:00:00 2001 From: Diego Vieira Date: Tue, 30 May 2017 15:05:09 +0100 Subject: [PATCH 09/11] fix mssql startup (#985) - Sleep 45s is invalid - /opt/mssql/bin/sqlservr is the correct path for mssql binary --- mssql/create_table.sh | 2 +- mssql/entrypoint.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mssql/create_table.sh b/mssql/create_table.sh index f0c1a7c6..9fe5214c 100644 --- a/mssql/create_table.sh +++ b/mssql/create_table.sh @@ -1,5 +1,5 @@ #wait for the SQL Server to come up -sleep 45s +sleep 45 #run the setup script to create the DB and the schema in the DB /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -d master -i setup.sql \ No newline at end of file diff --git a/mssql/entrypoint.sh b/mssql/entrypoint.sh index e3835130..062293b8 100644 --- a/mssql/entrypoint.sh +++ b/mssql/entrypoint.sh @@ -1,2 +1,2 @@ #start SQL Server, start the script to create the DB and import the data, start the app -/opt/mssql/bin/sqlservr.sh & /usr/src/app/create_table.sh & tail -f /dev/null \ No newline at end of file +/opt/mssql/bin/sqlservr & /usr/src/app/create_table.sh & tail -f /dev/null From d0c0a8895efcc36d89f03e8869ad971bd2704d4a Mon Sep 17 00:00:00 2001 From: Lawrence Eldridge Date: Tue, 30 May 2017 15:05:30 +0100 Subject: [PATCH 10/11] add global instance of larval installer for fresh projects. (#988) --- docker-compose.yml | 1 + env-example | 1 + workspace/Dockerfile-56 | 17 +++++++++++++++++ workspace/Dockerfile-70 | 17 +++++++++++++++++ workspace/Dockerfile-71 | 17 +++++++++++++++++ 5 files changed, 53 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index f05663c2..93c6663e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,6 +28,7 @@ services: - COMPOSER_GLOBAL_INSTALL=${WORKSPACE_COMPOSER_GLOBAL_INSTALL} - INSTALL_WORKSPACE_SSH=${WORKSPACE_INSTALL_WORKSPACE_SSH} - INSTALL_LARAVEL_ENVOY=${WORKSPACE_INSTALL_LARAVEL_ENVOY} + - INSTALL_LARAVEL_INSTALLER=${WORKSPACE_INSTALL_LARAVEL_INSTALLER} - INSTALL_DEPLOYER=${WORKSPACE_INSTALL_DEPLOYER} - INSTALL_LINUXBREW=${WORKSPACE_INSTALL_LINUXBREW} - INSTALL_MC=${WORKSPACE_INSTALL_MC} diff --git a/env-example b/env-example index 7ec7e921..fc4832da 100644 --- a/env-example +++ b/env-example @@ -41,6 +41,7 @@ WORKSPACE_INSTALL_V8JS=false WORKSPACE_COMPOSER_GLOBAL_INSTALL=false WORKSPACE_INSTALL_WORKSPACE_SSH=false WORKSPACE_INSTALL_LARAVEL_ENVOY=false +WORKSPACE_INSTALL_LARAVEL_INSTALLER=false WORKSPACE_INSTALL_DEPLOYER=false WORKSPACE_INSTALL_LINUXBREW=false WORKSPACE_INSTALL_MC=false diff --git a/workspace/Dockerfile-56 b/workspace/Dockerfile-56 index 42d0256b..2ae0a6cd 100644 --- a/workspace/Dockerfile-56 +++ b/workspace/Dockerfile-56 @@ -333,6 +333,23 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \ composer global require "laravel/envoy=~1.0" \ ;fi +##################################### +# Laravel Installer: +##################################### +USER root + +ARG INSTALL_LARAVEL_INSTALLER=true +ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER} + +RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \ + # Install the Laravel Installer + echo "" >> ~/.bashrc && \ + echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \ + && composer global require "laravel/installer" \ +;fi + +USER laradock + ##################################### # Deployer: ##################################### diff --git a/workspace/Dockerfile-70 b/workspace/Dockerfile-70 index 9c7d5627..00747d81 100644 --- a/workspace/Dockerfile-70 +++ b/workspace/Dockerfile-70 @@ -350,6 +350,23 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \ composer global require "laravel/envoy=~1.0" \ ;fi +##################################### +# Laravel Installer: +##################################### +USER root + +ARG INSTALL_LARAVEL_INSTALLER=true +ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER} + +RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \ + # Install the Laravel Installer + echo "" >> ~/.bashrc && \ + echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \ + && composer global require "laravel/installer" \ +;fi + +USER laradock + ##################################### # Deployer: ##################################### diff --git a/workspace/Dockerfile-71 b/workspace/Dockerfile-71 index 71d865b3..151df362 100644 --- a/workspace/Dockerfile-71 +++ b/workspace/Dockerfile-71 @@ -350,6 +350,23 @@ RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \ composer global require "laravel/envoy=~1.0" \ ;fi +##################################### +# Laravel Installer: +##################################### +USER root + +ARG INSTALL_LARAVEL_INSTALLER=true +ENV INSTALL_LARAVEL_INSTALLER ${INSTALL_LARAVEL_INSTALLER} + +RUN if [ ${INSTALL_LARAVEL_INSTALLER} = true ]; then \ + # Install the Laravel Installer + echo "" >> ~/.bashrc && \ + echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \ + && composer global require "laravel/installer" \ +;fi + +USER laradock + ##################################### # Deployer: ##################################### From d0e5d507121209c343e1a50276bfe9435132788d Mon Sep 17 00:00:00 2001 From: Mahmoud Zalt Date: Tue, 30 May 2017 17:41:11 +0300 Subject: [PATCH 11/11] Update readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 269465c6..daa9e6ff 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ A Docker PHP development environment that facilitates running **PHP** Apps on ** - [Winfried van Loon](https://github.com/winfried-van-loon) @winfried-van-loon - [TJ Miller](https://github.com/sixlive) @sixlive - [Yu-Lung Shao (Allen)](https://github.com/bestlong) @bestlong +- [Milan Urukalo](https://github.com/urukalo) @urukalo - Join Us. ## License