-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add supervisor and start cron + fulltextsearch:live from container.
- Loading branch information
Showing
4 changed files
with
84 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
set -eu | ||
|
||
exec busybox crond -f -l 0 -L /dev/stdout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
# If fulltextsearch is present: stop all running indexes before start live. | ||
[ -d /var/www/apps/fulltextsearch ] && echo php /var/www/occ fulltextsearch:stop | ||
|
||
# If fulltextsearch is present: start live index | ||
[ -d /var/www/apps/fulltextsearch ] && php /var/www/occ fulltextsearch:live |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
; Inspired by https://github.com/nextcloud/docker/blob/master/.examples/dockerfiles/cron/apache/supervisord.conf | ||
[supervisord] | ||
nodaemon=true | ||
user=root | ||
logfile=/var/log/supervisor/supervisord.log | ||
pidfile=/var/run/supervisor/supervisord.pid | ||
childlogdir=/var/log/supervisor/ | ||
logfile_maxbytes=50MB ; maximum size of logfile before rotation | ||
logfile_backups=10 ; number of backed up logfiles | ||
loglevel=error | ||
|
||
[program:php-fpm] | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 | ||
user=root # Run as root because using config to start process like www-data. | ||
command=php-fpm | ||
|
||
[program:cron] | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 | ||
user=root | ||
command=/cron.sh | ||
|
||
[program:fulltextsearch_index_live] | ||
stdout_logfile=/dev/stdout | ||
stdout_logfile_maxbytes=0 | ||
stderr_logfile=/dev/stderr | ||
stderr_logfile_maxbytes=0 | ||
user=www-data | ||
command=/bin/sh /nc_fulltextsearch_live.sh |