Skip to content

Commit

Permalink
using of supervisor for starting services
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Sep 19, 2018
1 parent 6d0411d commit a4e8783
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 13 deletions.
5 changes: 4 additions & 1 deletion grouper-midpoint/mp-gr/midpoint-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ RUN curl -o /etc/yum.repos.d/zulu.repo http://repos.azulsystems.com/rhel/zulu.re
RUN yum -y update
RUN yum -y install zulu-8

RUN yum -y install supervisor
COPY container_files/supervisor/supervisord.conf /etc/supervisord.conf

RUN rm /etc/shibboleth/sp-key.pem /etc/shibboleth/sp-cert.pem

COPY container_files/httpd/conf/* /etc/httpd/conf.d/
Expand Down Expand Up @@ -62,4 +65,4 @@ ENV AJP_ENABLED true
ENV AJP_PORT 9090
ENV LOGOUT_URL https://localhost:4438/Shibboleth.sso/Logout

ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["/usr/bin/supervisord"]
32 changes: 20 additions & 12 deletions ...ntainer_files/usr-local-bin/entrypoint.sh → ...ntainer_files/supervisor/supervisord.conf
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
#!/bin/bash
[supervisord]
nodaemon=true

. /usr/local/bin/library.sh
linkSecrets
[program:init]
command=/usr/local/bin/init.sh
autostart=true

. /usr/local/bin/library.sh
checkMidpointSecurityProfile
[program:httpd-shib]
command=httpd-shib-foreground
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
redirect_stderr=true
autostart=true


httpd-shib-foreground &

java -Xmx2048M -Xms2048M -Dfile.encoding=UTF8 \
[program:midpoint]
command=/bin/bash -c "java -Xmx2048M -Xms2048M -Dfile.encoding=UTF8 \
-Dmidpoint.home=$MP_DIR/var \
-Dmidpoint.repository.database=mariadb \
-Dmidpoint.repository.jdbcUsername=$REPO_USER \
Expand All @@ -18,10 +22,14 @@ java -Xmx2048M -Xms2048M -Dfile.encoding=UTF8 \
-Dmidpoint.repository.hibernateHbm2ddl=none \
-Dmidpoint.repository.missingSchemaAction=create \
-Dmidpoint.repository.initializationFailTimeout=60000 \
-Dmidpoint.logging.console.enabled=true -Dmidpoint.logging.console.prefix="midpoint;midpoint.log;$ENV;$USERTOKEN;" -Dmidpoint.logging.console.timezone=UTC \
-Dmidpoint.logging.console.enabled=true -Dmidpoint.logging.console.prefix='midpoint;midpoint.log;$ENV;$USERTOKEN;' -Dmidpoint.logging.console.timezone=UTC \
-Dspring.profiles.active=$ACTIVE_PROFILE \
-Dauth.sso.header=$SSO_HEADER \
-Dauth.logout.url="$LOGOUT_URL" \
-Dauth.logout.url=$LOGOUT_URL \
-Dserver.tomcat.ajp.enabled=$AJP_ENABLED \
-Dserver.tomcat.ajp.port=$AJP_PORT \
-jar $MP_DIR/lib/midpoint.war
-jar $MP_DIR/lib/midpoint.war"
stdout_logfile=/dev/fd/2
stdout_logfile_maxbytes=0
redirect_stderr=true
autostart=true
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

. /usr/local/bin/library.sh
linkSecrets

. /usr/local/bin/library.sh
checkMidpointSecurityProfile

0 comments on commit a4e8783

Please sign in to comment.