GNU parallel in workspace container (#2102)

* added parallel workers
* removed debug sleep
* added documentation how to install GNU parallel
This commit is contained in:
Daniel Seif 2019-05-09 07:42:50 +02:00 committed by Shao Yu-Lung (Allen)
parent e8d84cf9a3
commit c7289f7db3
4 changed files with 36 additions and 0 deletions

View File

@ -1737,6 +1737,27 @@ To install FFMPEG in the Workspace container
<br>
<a name="Install-GNU-Parallel"></a>
## Install GNU Parallel
GNU Parallel is a command line tool to run multiple processes in parallel.
(see https://www.gnu.org/software/parallel/parallel_tutorial.html)
To install GNU Parallel in the Workspace container
1 - Open the `.env` file
2 - Search for the `WORKSPACE_INSTALL_GNU_PARALLEL` argument under the Workspace Container and set it to `true`
3 - Re-build the container `docker-compose build workspace`
<br> <br>
<a name="Common-Aliases"></a> <a name="Common-Aliases"></a>
<br> <br>

View File

@ -112,6 +112,7 @@ services:
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN} - BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
- INSTALL_POWERLINE=${WORKSPACE_INSTALL_POWERLINE} - INSTALL_POWERLINE=${WORKSPACE_INSTALL_POWERLINE}
- INSTALL_FFMPEG=${WORKSPACE_INSTALL_FFMPEG} - INSTALL_FFMPEG=${WORKSPACE_INSTALL_FFMPEG}
- INSTALL_GNU_PARALLEL=${WORKSPACE_INSTALL_GNU_PARALLEL}
volumes: volumes:
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG} - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
extra_hosts: extra_hosts:

View File

@ -140,6 +140,7 @@ WORKSPACE_CHROME_DRIVER_VERSION=2.42
WORKSPACE_TIMEZONE=UTC WORKSPACE_TIMEZONE=UTC
WORKSPACE_SSH_PORT=2222 WORKSPACE_SSH_PORT=2222
WORKSPACE_INSTALL_FFMPEG=false WORKSPACE_INSTALL_FFMPEG=false
WORKSPACE_INSTALL_GNU_PARALLEL=false
### PHP_FPM ############################################### ### PHP_FPM ###############################################

View File

@ -1002,6 +1002,19 @@ RUN if [ ${INSTALL_FFMPEG} = true ]; then \
apt-get -y install ffmpeg \ apt-get -y install ffmpeg \
;fi ;fi
###########################################################################
# GNU Parallel:
###########################################################################
USER root
ARG INSTALL_GNU_PARALLEL=false
RUN if [ ${INSTALL_GNU_PARALLEL} = true ]; then \
apt-get -y install parallel \
;fi
########################################################################### ###########################################################################
# Check PHP version: # Check PHP version:
########################################################################### ###########################################################################