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
This commit is contained in:
Talip Durmuş 2017-01-31 11:05:42 +02:00 committed by Bo-Yi Wu
parent e9d4e5579e
commit c5e2e7e1e2
3 changed files with 50 additions and 7 deletions

View File

@ -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:
<br>
<a name="Install-Deployer"></a>
### Install Deployer (Deployment tool for PHP)
1 - Open the `docker-compose.yml` file
<br>
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.

View File

@ -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

View File

@ -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
#####################################