Skip to content

Commit

Permalink
Merge pull request opendatahub-io#278 from atheo89/RHOAIENG-8298
Browse files Browse the repository at this point in the history
Replace fcgi with supervisord on rstudio rhel flavor
  • Loading branch information
openshift-merge-bot[bot] authored Jun 26, 2024
2 parents e1dae77 + 5ca446d commit 756e5f5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
6 changes: 3 additions & 3 deletions rstudio/rhel9-python-3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ ENV NGINX_VERSION=1.22 \

# Modules does not exist
RUN yum -y module enable nginx:$NGINX_VERSION && \
INSTALL_PKGS="nss_wrapper bind-utils gettext hostname nginx nginx-mod-stream nginx-mod-http-perl fcgiwrap initscripts chkconfig" && \
INSTALL_PKGS="nss_wrapper bind-utils gettext hostname nginx nginx-mod-stream nginx-mod-http-perl fcgiwrap initscripts chkconfig supervisor" && \
yum install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
rpm -V $INSTALL_PKGS && \
nginx -v 2>&1 | grep -qe "nginx/$NGINX_VERSION\." && echo "Found VERSION $NGINX_VERSION" && \
# spawn-fcgi is not in epel9
rpm -i --nodocs https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/37/Everything/x86_64/os/Packages/s/spawn-fcgi-1.6.3-23.fc37.x86_64.rpm && \
yum -y clean all --enablerepo='*'

COPY --chown=1001:0 rstudio/rhel9-python-3.9/supervisord/supervisord.conf /etc/supervisor/conf.d/supervisord.conf

# Copy extra files to the image.
COPY rstudio/rhel9-python-3.9/nginx/root/ /

Expand Down
4 changes: 2 additions & 2 deletions rstudio/rhel9-python-3.9/run-rstudio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
SCRIPT_DIR=$(dirname -- "$0")
source ${SCRIPT_DIR}/utils/*.sh

# Start nginx and fastcgiwrap
# Start nginx and supervisord
run-nginx.sh &
spawn-fcgi -s /var/run/fcgiwrap.socket -M 766 /usr/sbin/fcgiwrap
/usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf &


# Add .bashrc for custom promt if not present
Expand Down
8 changes: 8 additions & 0 deletions rstudio/rhel9-python-3.9/supervisord/supervisord.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[supervisord]
nodaemon=true

[program:fcgiwrap]
command=/usr/sbin/fcgiwrap -s unix:/var/run/fcgiwrap.socket
autostart=true
autorestart=true
redirect_stderr=true

0 comments on commit 756e5f5

Please sign in to comment.