瀏覽代碼

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
Talip Durmuş 8 年之前
父節點
當前提交
c5e2e7e1e2
共有 3 個文件被更改,包括 47 次插入4 次删除
  1. 28 1
      README.md
  2. 1 0
      docker-compose.yml
  3. 18 3
      workspace/Dockerfile

+ 28 - 1
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,15 +1639,40 @@ It should be like this:
 
 
 
+<br>
 
+<a name="Install-Deployer"></a>
+### Install Deployer (Deployment tool for PHP)
 
+1 - Open the `docker-compose.yml` file
 <br>
-<a name="debugging"></a>
+2 - Search for the `INSTALL_DEPLOYER` argument under the Workspace Container
+<br>
+3 - Set it to `true`
+<br>
+
+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)
 
 
 
+<br>
+
+
+<a name="debugging"></a>
+
 
 ### PHPStorm
 Remote debug Laravel web and phpunit tests.

+ 1 - 0
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

+ 18 - 3
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
 
 #####################################