Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    supervisord to manage running processes in nextcloud app

    Nextcloud
    3
    6
    282
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • vladimir.d
      vladimir.d last edited by vladimir.d

      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
      

      ftr @staff and @appdev

      mehdi 1 Reply Last reply Reply Quote 2
      • mehdi
        mehdi App Dev @vladimir.d last edited by mehdi

        @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 the start.sh

        vladimir.d 1 Reply Last reply Reply Quote 2
        • vladimir.d
          vladimir.d @mehdi last edited by vladimir.d

          @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-service

          Is there a better approach?

          girish 1 Reply Last reply Reply Quote 1
          • girish
            girish Staff @vladimir.d last edited by

            @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)

            vladimir.d 1 Reply Last reply Reply Quote 0
            • vladimir.d
              vladimir.d @girish last edited by

              @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/15

              Yes, fulltextsearch:live should be always run and being restarted if it gets stuck.
              https://github.com/nextcloud/fulltextsearch/wiki/Basic-Installation#live-index-service

              girish 1 Reply Last reply Reply Quote 1
              • girish
                girish Staff @vladimir.d last edited by

                @vladimir-d OK thanks, I will take this into account when trying to add cron support (or equivalent) for 6.4

                1 Reply Last reply Reply Quote 2
                • First post
                  Last post
                Powered by NodeBB