supervisord to manage running processes in nextcloud app
-
Hi,
We need to run Live index service for full-text search so I suggest adding the ability to configure supervisord in the application.
Here is the patch I propose to include into the mainstream:
https://git.cloudron.io/vladimir.d/nextcloud-app/-/merge_requests/1/diffs
In this case we will be able to create our own config to run indexing service using supervisor, e.g.
/app/data/supervisor/conf.d/fulltextsearch_index.conf
[program:fulltextsearch_index] directory=/app/code user=www-data command=/usr/bin/php /app/code/occ fulltextsearch:live -q stdout_logfile=/dev/stdout stdout_logfile_maxbytes=0 stderr_logfile=/dev/stderr stderr_logfile_maxbytes=0
-
@vladimir-d Your patch will not work :
/app/data
is mounted on runtime, so anything you put in it in build-time will be overridden by what's mounted.In any case, I am not a fan of what you are proposing : putting something as "core" as supervisor config files in
/app/data
is not really Cloudron-like. For what you want to achieve, I think it would be better to build a custom app as a fork of the official Nextcloud app.EDIT: if you want to achieve what you're trying to do here, what you should do is put the supervisor files in
/app/code
, then copy them to/app/data
at runtime in thestart.sh
-
@mehdi not sure why we need to copy config files from
/app/code
to/app/data
at runtime. They are intended to be specific for every instance.What I'm trying to achieve is
https://github.com/nextcloud/fulltextsearch/wiki/Basic-Installation#live-index-serviceIs there a better approach?
-
@vladimir-d Did I understand correctly that this requires two things:
a) an external elastic search server
b) an index service that is always running (/app/code/occ fulltextsearch:live) -
@girish You are right, it requires an external elastic search server so we have built ElasticSearch app for cloudron.
https://forum.cloudron.io/topic/1339/nextcloud-fulltext-search/15Yes,
fulltextsearch:live
should be always run and being restarted if it gets stuck.
https://github.com/nextcloud/fulltextsearch/wiki/Basic-Installation#live-index-service -
@vladimir-d OK thanks, I will take this into account when trying to add cron support (or equivalent) for 6.4