Better s6 service stop handling

This commit is contained in:
Disassembler 2018-09-21 11:04:12 +02:00
parent 74b7d9478f
commit ed2e1193cb
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
17 changed files with 47 additions and 22 deletions

View File

@ -1,3 +1,4 @@
#!/bin/sh #!/bin/execlineb -P
/bin/true foreground { s6-svwait -d -t 3000 cts }
foreground { s6-svwait -d -t 3000 nginx }

View File

@ -0,0 +1 @@
SIGINT

View File

@ -1,3 +1,4 @@
#!/bin/sh #!/bin/execlineb -P
/bin/true foreground { s6-svwait -d -t 3000 frontlinesms }
foreground { s6-svwait -d -t 3000 x11 }

View File

@ -1,3 +1,4 @@
#!/bin/sh #!/bin/execlineb -P
/bin/true foreground { s6-svwait -d -t 3000 nginx }
foreground { s6-svwait -d -t 3000 php-fpm }

View File

@ -0,0 +1,3 @@
#!/bin/execlineb -P
foreground { s6-svwait -d -t 3000 mifosx }

View File

@ -0,0 +1,6 @@
#!/bin/execlineb -P
cd /srv/tomcat
fdmove -c 2 1
s6-setuidgid mifosx
catalina.sh run

View File

@ -39,9 +39,10 @@ RUN EOF
rm /tmp/locale-cs.patch rm /tmp/locale-cs.patch
EOF EOF
# s6 required for single service due to hanging threads
COPY lxc
MOUNT FILE /srv/mifosx/conf/server.xml srv/tomcat/conf/server.xml MOUNT FILE /srv/mifosx/conf/server.xml srv/tomcat/conf/server.xml
MOUNT FILE /srv/mifosx/conf/context.xml srv/tomcat/webapps/fineract-provider/META-INF/context.xml MOUNT FILE /srv/mifosx/conf/context.xml srv/tomcat/webapps/fineract-provider/META-INF/context.xml
USER 8012 8012 CMD s6-svscan /etc/services.d
WORKDIR /srv/tomcat
CMD catalina.sh run

View File

@ -1,3 +1,4 @@
#!/bin/sh #!/bin/execlineb -P
/bin/true foreground { s6-svwait -d -t 3000 build2xlsform }
foreground { s6-svwait -d -t 3000 odkbuild }

View File

@ -0,0 +1 @@
SIGINT

View File

@ -2,6 +2,6 @@
cd /srv/opendatakit-build cd /srv/opendatakit-build
fdmove -c 2 1 fdmove -c 2 1
foreground { /usr/sbin/update-ca-certificates } foreground { update-ca-certificates }
s6-setuidgid odkbuild s6-setuidgid odkbuild
bundle exec rackup config.ru -o 0.0.0.0 -p 8080 bundle exec rackup config.ru -o 0.0.0.0 -p 8080

View File

@ -1,3 +1,3 @@
#!/bin/sh #!/bin/execlineb -P
/bin/true foreground { s6-svwait -d -t 3000 openmapkit }

View File

@ -36,6 +36,7 @@ RUN EOF
rm -rf /root/.cache /root/.config /root/.node-gyp /root/.npm rm -rf /root/.cache /root/.config /root/.node-gyp /root/.npm
EOF EOF
# s6 required for single service due to inability of nodejs to process signals when running as PID 1
COPY lxc COPY lxc
MOUNT FILE /srv/openmapkit/conf/settings.js srv/openmapkit/settings.js MOUNT FILE /srv/openmapkit/conf/settings.js srv/openmapkit/settings.js

View File

@ -1,3 +1,7 @@
#!/bin/sh #!/bin/execlineb -P
/bin/true foreground { s6-svwait -d -t 3000 nginx }
foreground { s6-svwait -d -t 3000 pandora }
foreground { s6-svwait -d -t 3000 pandora-cron }
foreground { s6-svwait -d -t 3000 pandora-encoding }
foreground { s6-svwait -d -t 3000 pandora-tasks }

View File

@ -1,3 +1,4 @@
#!/bin/sh #!/bin/execlineb -P
/bin/true foreground { s6-svwait -d -t 3000 nginx }
foreground { s6-svwait -d -t 3000 uwsgi }

View File

@ -0,0 +1 @@
SIGINT

View File

@ -1,3 +1,4 @@
#!/bin/sh #!/bin/execlineb -P
/bin/true foreground { s6-svwait -d -t 3000 nginx }
foreground { s6-svwait -d -t 3000 php-fpm }

View File

@ -1,3 +1,4 @@
#!/bin/sh #!/bin/execlineb -P
/bin/true foreground { s6-svwait -d -t 3000 nginx }
foreground { s6-svwait -d -t 3000 php-fpm }