From c5e2e7e1e2f342e7fbb530c5e68d9165754f93f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Talip=20Durmu=C5=9F?= Date: Tue, 31 Jan 2017 11:05:42 +0200 Subject: [PATCH] Add deployer support (#579) * add deployer option * export path for all composer global installations * add deployer option * fix typo * add readme for deployer installation * deployer default option changed to false * Add missing deployer menu --- README.md | 35 +++++++++++++++++++++++++++++++---- docker-compose.yml | 1 + workspace/Dockerfile | 21 ++++++++++++++++++--- 3 files changed, 50 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index d56a857..7446cf0 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ Laradock is configured to run Laravel Apps by default, and it can be modified to - [Install Node + YARN](#Install-Yarn) - [Install Linuxbrew](#Install-Linuxbrew) - [Common Terminal Aliases](#Common-Aliases) + - [Install Deployer](#Install-Deployer) - [Debugging](#debugging) - [Upgrading LaraDock](#upgrading-laradock) - [Related Projects](#related-projects) @@ -196,6 +197,7 @@ That's it! enjoy :) - SQLite - xDebug - Envoy + - Deployer - Vim - Yarn - ... Many other supported tools are not documented. (Will be updated soon) @@ -1637,16 +1639,41 @@ It should be like this: +
+ + +### Install Deployer (Deployment tool for PHP) + +1 - Open the `docker-compose.yml` file +
+2 - Search for the `INSTALL_DEPLOYER` argument under the Workspace Container +
+3 - Set it to `true` +
+ +It should be like this: + +```yml + workspace: + build: + context: ./workspace + args: + - INSTALL_DEPLOYER=true + ... +``` + +4 - Re-build the containers `docker-compose build workspace` + +####[Deployer Documentation Here](https://deployer.org/docs) +
+ + - - - - ### PHPStorm Remote debug Laravel web and phpunit tests. diff --git a/docker-compose.yml b/docker-compose.yml index bf34bf1..3199a3f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -26,6 +26,7 @@ services: - COMPOSER_GLOBAL_INSTALL=false - INSTALL_WORKSPACE_SSH=false - INSTALL_LARAVEL_ENVOY=false + - INSTALL_DEPLOYER=false - INSTALL_LINUXBREW=false - PUID=1000 - PGID=1000 diff --git a/workspace/Dockerfile b/workspace/Dockerfile index 0616cdb..8748246 100644 --- a/workspace/Dockerfile +++ b/workspace/Dockerfile @@ -74,6 +74,10 @@ RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \ composer global install \ ;fi +# Export composer vendor path +RUN echo "" >> ~/.bashrc && \ +echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc + ##################################### # Crontab ##################################### @@ -304,9 +308,20 @@ ENV INSTALL_LARAVEL_ENVOY ${INSTALL_LARAVEL_ENVOY} RUN if [ ${INSTALL_LARAVEL_ENVOY} = true ]; then \ # Install the Laravel Envoy - echo "" >> ~/.bashrc && \ - echo 'export PATH="~/.composer/vendor/bin:$PATH"' >> ~/.bashrc \ - && composer global require "laravel/envoy=~1.0" \ + composer global require "laravel/envoy=~1.0" \ +;fi + +##################################### +# Deployer: +##################################### +USER laradock + +ARG INSTALL_DEPLOYER=false +ENV INSTALL_DEPLOYER ${INSTALL_DEPLOYER} + +RUN if [ ${INSTALL_DEPLOYER} = true ]; then \ + # Install the Deployer + composer global require "deployer/deployer" \ ;fi #####################################