Skip to content

Commit 3cdc771

Browse files
authored
Merge pull request laradock#2330 from amorZhu/master
Install supervisord in the workspace
2 parents c09261e + 41438e9 commit 3cdc771

4 files changed

Lines changed: 38 additions & 0 deletions

File tree

DOCUMENTATION/content/documentation/index.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,6 +1865,27 @@ To install GNU Parallel in the Workspace container
18651865

18661866

18671867

1868+
<br>
1869+
<a name="Install-Supervisor"></a>
1870+
## Install Supervisor
1871+
1872+
Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems.
1873+
1874+
(see http://supervisord.org/index.html)
1875+
1876+
To install Supervisor in the Workspace container
1877+
1878+
1 - Open the `.env` file
1879+
1880+
2 - Set `WORKSPACE_INSTALL_SUPERVISOR` and `WORKSPACE_INSTALL_PYTHON` to `true`.
1881+
1882+
3 - Re-build the container `docker-compose build workspace` Or `docker-composer up --build -d workspace`
1883+
1884+
1885+
1886+
1887+
1888+
18681889
<br>
18691890
<a name="Common-Aliases"></a>
18701891
<br>

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,15 @@ services:
121121
- BLACKFIRE_CLIENT_ID=${BLACKFIRE_CLIENT_ID}
122122
- BLACKFIRE_CLIENT_TOKEN=${BLACKFIRE_CLIENT_TOKEN}
123123
- INSTALL_POWERLINE=${WORKSPACE_INSTALL_POWERLINE}
124+
- INSTALL_SUPERVISOR=${WORKSPACE_INSTALL_SUPERVISOR}
124125
- INSTALL_FFMPEG=${WORKSPACE_INSTALL_FFMPEG}
125126
- INSTALL_GNU_PARALLEL=${WORKSPACE_INSTALL_GNU_PARALLEL}
126127
- http_proxy
127128
- https_proxy
128129
- no_proxy
129130
volumes:
130131
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
132+
- ./php-worker/supervisord.d:/etc/supervisord.d
131133
extra_hosts:
132134
- "dockerhost:${DOCKER_HOST_IP}"
133135
ports:

env-example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ WORKSPACE_INSTALL_MC=false
124124
WORKSPACE_INSTALL_SYMFONY=false
125125
WORKSPACE_INSTALL_PYTHON=false
126126
WORKSPACE_INSTALL_POWERLINE=false
127+
WORKSPACE_INSTALL_SUPERVISOR=false
127128
WORKSPACE_INSTALL_IMAGE_OPTIMIZERS=false
128129
WORKSPACE_INSTALL_IMAGEMAGICK=false
129130
WORKSPACE_INSTALL_TERRAFORM=false

workspace/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,20 @@ RUN if [ ${INSTALL_POWERLINE} = true ]; then \
957957
;fi \
958958
;fi
959959

960+
###########################################################################
961+
# SUPERVISOR:
962+
###########################################################################
963+
ARG INSTALL_SUPERVISOR=false
964+
965+
RUN if [ ${INSTALL_SUPERVISOR} = true ]; then \
966+
if [ ${INSTALL_PYTHON} = true ]; then \
967+
python -m pip install --upgrade supervisor && \
968+
echo_supervisord_conf > /etc/supervisord.conf && \
969+
sed -i 's/\;\[include\]/\[include\]/g' /etc/supervisord.conf && \
970+
sed -i 's/\;files\s.*/files = supervisord.d\/*.conf/g' /etc/supervisord.conf \
971+
;fi \
972+
;fi
973+
960974
USER laradock
961975

962976
###########################################################################

0 commit comments

Comments
 (0)