Merge pull request #2330 from amorZhu/master
Install supervisord in the workspace
This commit is contained in:
commit
3cdc771abd
@ -1865,6 +1865,27 @@ To install GNU Parallel in the Workspace container
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<a name="Install-Supervisor"></a>
|
||||||
|
## Install Supervisor
|
||||||
|
|
||||||
|
Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems.
|
||||||
|
|
||||||
|
(see http://supervisord.org/index.html)
|
||||||
|
|
||||||
|
To install Supervisor in the Workspace container
|
||||||
|
|
||||||
|
1 - Open the `.env` file
|
||||||
|
|
||||||
|
2 - Set `WORKSPACE_INSTALL_SUPERVISOR` and `WORKSPACE_INSTALL_PYTHON` to `true`.
|
||||||
|
|
||||||
|
3 - Re-build the container `docker-compose build workspace` Or `docker-composer up --build -d workspace`
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<a name="Common-Aliases"></a>
|
<a name="Common-Aliases"></a>
|
||||||
<br>
|
<br>
|
||||||
|
@ -121,6 +121,7 @@ services:
|
|||||||
- BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
|
- BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
|
||||||
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
|
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
|
||||||
- INSTALL_POWERLINE=${WORKSPACE_INSTALL_POWERLINE}
|
- INSTALL_POWERLINE=${WORKSPACE_INSTALL_POWERLINE}
|
||||||
|
- INSTALL_SUPERVISOR=${WORKSPACE_INSTALL_SUPERVISOR}
|
||||||
- INSTALL_FFMPEG=${WORKSPACE_INSTALL_FFMPEG}
|
- INSTALL_FFMPEG=${WORKSPACE_INSTALL_FFMPEG}
|
||||||
- INSTALL_GNU_PARALLEL=${WORKSPACE_INSTALL_GNU_PARALLEL}
|
- INSTALL_GNU_PARALLEL=${WORKSPACE_INSTALL_GNU_PARALLEL}
|
||||||
- http_proxy
|
- http_proxy
|
||||||
@ -128,6 +129,7 @@ services:
|
|||||||
- no_proxy
|
- no_proxy
|
||||||
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}
|
||||||
|
- ./php-worker/supervisord.d:/etc/supervisord.d
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "dockerhost:${DOCKER_HOST_IP}"
|
- "dockerhost:${DOCKER_HOST_IP}"
|
||||||
ports:
|
ports:
|
||||||
|
@ -124,6 +124,7 @@ WORKSPACE_INSTALL_MC=false
|
|||||||
WORKSPACE_INSTALL_SYMFONY=false
|
WORKSPACE_INSTALL_SYMFONY=false
|
||||||
WORKSPACE_INSTALL_PYTHON=false
|
WORKSPACE_INSTALL_PYTHON=false
|
||||||
WORKSPACE_INSTALL_POWERLINE=false
|
WORKSPACE_INSTALL_POWERLINE=false
|
||||||
|
WORKSPACE_INSTALL_SUPERVISOR=false
|
||||||
WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false
|
WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false
|
||||||
WORKSPACE_INSTALL_IMAGEMAGICK=false
|
WORKSPACE_INSTALL_IMAGEMAGICK=false
|
||||||
WORKSPACE_INSTALL_TERRAFORM=false
|
WORKSPACE_INSTALL_TERRAFORM=false
|
||||||
|
@ -957,6 +957,20 @@ RUN if [ ${INSTALL_POWERLINE} = true ]; then \
|
|||||||
;fi \
|
;fi \
|
||||||
;fi
|
;fi
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
# SUPERVISOR:
|
||||||
|
###########################################################################
|
||||||
|
ARG INSTALL_SUPERVISOR=false
|
||||||
|
|
||||||
|
RUN if [ ${INSTALL_SUPERVISOR} = true ]; then \
|
||||||
|
if [ ${INSTALL_PYTHON} = true ]; then \
|
||||||
|
python -m pip install --upgrade supervisor && \
|
||||||
|
echo_supervisord_conf > /etc/supervisord.conf && \
|
||||||
|
sed -i 's/\;\[include\]/\[include\]/g' /etc/supervisord.conf && \
|
||||||
|
sed -i 's/\;files\s.*/files = supervisord.d\/*.conf/g' /etc/supervisord.conf \
|
||||||
|
;fi \
|
||||||
|
;fi
|
||||||
|
|
||||||
USER laradock
|
USER laradock
|
||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user