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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. App Packaging & Development
  3. Passing the Healthcheck on custom app

Passing the Healthcheck on custom app

Scheduled Pinned Locked Moved App Packaging & Development
18 Posts 3 Posters 2.2k Views 2 Watching
  • 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.
  • H hendrikvl

    I had the same issue with a custom app I created. My solution was to include a webserver that runs in parallel via supervisord, although my custom app would not require it for its own functioning.
    A sample of what this could look like is in the supervisor demo-app: https://git.cloudron.io/cloudron/tutorial-supervisor-app/
    The webserver in there only returns a static page with status code 200, which is all you need to pass the health-check.

    timconsidineT Offline
    timconsidineT Offline
    timconsidine
    App Dev
    wrote on last edited by
    #4

    @hendrikvl : great, that works !
    Integrated the tutorial-supervisor app with the custom app.
    It now passes the healthcheck 🍾

    Now need to learn about supervisor and how to build an interface for source file upload and PDF download. I'm just a monkey see, monkey do hacker.

    Thanks again @hendrikvl !

    1 Reply Last reply
    1
    • nebulonN Offline
      nebulonN Offline
      nebulon
      Staff
      wrote on last edited by
      #5

      Yes what @hendrikvl suggested is correct. One reason also why Cloudron apps are essentially required to have something on http(s) is that the app will show up in the dashboard and when someone clicks on the app tile, it should go somewhere meaningful.

      I guess "worker" apps were simply not part of the current design and so far not really much asked for and it looks like even in your case, some rudimentary webinterface is wanted.

      timconsidineT 2 Replies Last reply
      1
      • nebulonN nebulon

        Yes what @hendrikvl suggested is correct. One reason also why Cloudron apps are essentially required to have something on http(s) is that the app will show up in the dashboard and when someone clicks on the app tile, it should go somewhere meaningful.

        I guess "worker" apps were simply not part of the current design and so far not really much asked for and it looks like even in your case, some rudimentary webinterface is wanted.

        timconsidineT Offline
        timconsidineT Offline
        timconsidine
        App Dev
        wrote on last edited by
        #6

        @nebulon yes indeed.
        Now I know what to do for basic response, all is cool.
        I'm not a programmer really, just know how to hack about.

        One thought, I'm kinda ok with PHP.
        Is there anything to prevent me installing pandoc into a LAMP app ? It's basically :

        RUN apt-get -qq update && \
            apt-get -qq -y install wget texlive-latex-base texlive-fonts-recommended && \
            apt-get -qq -y install texlive-fonts-extra texlive-latex-extra && \
            apt-get -qq -y install lmodern && \
            apt-get clean
        
        RUN wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-1-amd64.deb && \
            dpkg -i pandoc* && \
            rm pandoc* && \
            apt-get clean
        

        I can do that manually maybe after installing LAMP and then build a web interface in PHP. Vaguely within my skill set !
        Or maybe I should just get modern and learn about nodejs.

        nebulonN 1 Reply Last reply
        0
        • timconsidineT timconsidine

          @nebulon yes indeed.
          Now I know what to do for basic response, all is cool.
          I'm not a programmer really, just know how to hack about.

          One thought, I'm kinda ok with PHP.
          Is there anything to prevent me installing pandoc into a LAMP app ? It's basically :

          RUN apt-get -qq update && \
              apt-get -qq -y install wget texlive-latex-base texlive-fonts-recommended && \
              apt-get -qq -y install texlive-fonts-extra texlive-latex-extra && \
              apt-get -qq -y install lmodern && \
              apt-get clean
          
          RUN wget https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-1-amd64.deb && \
              dpkg -i pandoc* && \
              rm pandoc* && \
              apt-get clean
          

          I can do that manually maybe after installing LAMP and then build a web interface in PHP. Vaguely within my skill set !
          Or maybe I should just get modern and learn about nodejs.

          nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #7

          @timconsidine the LAMP app package would not allow you to run apt-get and install further packages in a persistent manner, however you could essentially fork the LAMP app package and start from there.

          timconsidineT 1 Reply Last reply
          1
          • nebulonN nebulon

            @timconsidine the LAMP app package would not allow you to run apt-get and install further packages in a persistent manner, however you could essentially fork the LAMP app package and start from there.

            timconsidineT Offline
            timconsidineT Offline
            timconsidine
            App Dev
            wrote on last edited by
            #8

            @nebulon thank you

            1 Reply Last reply
            0
            • nebulonN nebulon

              Yes what @hendrikvl suggested is correct. One reason also why Cloudron apps are essentially required to have something on http(s) is that the app will show up in the dashboard and when someone clicks on the app tile, it should go somewhere meaningful.

              I guess "worker" apps were simply not part of the current design and so far not really much asked for and it looks like even in your case, some rudimentary webinterface is wanted.

              timconsidineT Offline
              timconsidineT Offline
              timconsidine
              App Dev
              wrote on last edited by
              #9

              @nebulon I decided to bite bullet and learn some basic node.js to build a basic web front-end.
              Works fine on my local machine using node server.js.
              But hangs when I build and install the image to Cloudron.
              Obviously down to me to debug what it doesn't like.
              I'm looking through some other Cloudron apps on https://git.cloudron.io/explore for clues and stuff to borrow.
              But a lot there.

              1. Wondering if anyone has a suggestion for Cloudron app which has a more sophisticated, but not too sophisticated, example!!

              2. My basic example uses :
                // var url = require('url');
                // var fs = require('fs');
                // var formidable = require('formidable');
                They're listed in package.json or package-lock.json.
                Might those be causing a problem with the Cloudron install?

              nebulonN 1 Reply Last reply
              1
              • timconsidineT timconsidine

                @nebulon I decided to bite bullet and learn some basic node.js to build a basic web front-end.
                Works fine on my local machine using node server.js.
                But hangs when I build and install the image to Cloudron.
                Obviously down to me to debug what it doesn't like.
                I'm looking through some other Cloudron apps on https://git.cloudron.io/explore for clues and stuff to borrow.
                But a lot there.

                1. Wondering if anyone has a suggestion for Cloudron app which has a more sophisticated, but not too sophisticated, example!!

                2. My basic example uses :
                  // var url = require('url');
                  // var fs = require('fs');
                  // var formidable = require('formidable');
                  They're listed in package.json or package-lock.json.
                  Might those be causing a problem with the Cloudron install?

                nebulonN Offline
                nebulonN Offline
                nebulon
                Staff
                wrote on last edited by
                #10

                @timconsidine might be easier, if you push your current code to some public repository or so, to better guide you.

                timconsidineT 2 Replies Last reply
                1
                • nebulonN nebulon

                  @timconsidine might be easier, if you push your current code to some public repository or so, to better guide you.

                  timconsidineT Offline
                  timconsidineT Offline
                  timconsidine
                  App Dev
                  wrote on last edited by
                  #11

                  @nebulon will do, good idea.

                  nebulonN 1 Reply Last reply
                  0
                  • timconsidineT timconsidine

                    @nebulon will do, good idea.

                    nebulonN Offline
                    nebulonN Offline
                    nebulon
                    Staff
                    wrote on last edited by
                    #12

                    @timconsidine may not be required, but the expressjs framework is usually a solid option to be used. Cloudron itself and also surfer and the likes use that.

                    timconsidineT 1 Reply Last reply
                    1
                    • nebulonN nebulon

                      @timconsidine may not be required, but the expressjs framework is usually a solid option to be used. Cloudron itself and also surfer and the likes use that.

                      timconsidineT Offline
                      timconsidineT Offline
                      timconsidine
                      App Dev
                      wrote on last edited by timconsidine
                      #13

                      @nebulon said in Passing the Healthcheck on custom app:

                      the expressjs framework is usually a solid option to be used

                      Express looks good but I will learn this another day. I had already gone down a "manual code" direction, and didn't want to re-do it. I will probably produce a new version with Express later.

                      1 Reply Last reply
                      0
                      • nebulonN nebulon

                        @timconsidine might be easier, if you push your current code to some public repository or so, to better guide you.

                        timconsidineT Offline
                        timconsidineT Offline
                        timconsidine
                        App Dev
                        wrote on last edited by
                        #14

                        @nebulon said in Passing the Healthcheck on custom app:

                        if you push your current code to some public repository

                        I have solved the problems I was encountering. Phew.
                        Now in a basic working state. Not pretty but functional.

                        I will share in case it can be useful to others or there is advice on how to do it better.

                        I tried to create a project on https://git.cloudron.io to upload
                        But I got invalid namespace
                        Is creating projects on git.cloudron.io restricted ?

                        timconsidineT nebulonN 2 Replies Last reply
                        0
                        • timconsidineT timconsidine

                          @nebulon said in Passing the Healthcheck on custom app:

                          if you push your current code to some public repository

                          I have solved the problems I was encountering. Phew.
                          Now in a basic working state. Not pretty but functional.

                          I will share in case it can be useful to others or there is advice on how to do it better.

                          I tried to create a project on https://git.cloudron.io to upload
                          But I got invalid namespace
                          Is creating projects on git.cloudron.io restricted ?

                          timconsidineT Offline
                          timconsidineT Offline
                          timconsidine
                          App Dev
                          wrote on last edited by timconsidine
                          #15

                          @timconsidine I have created a public repository at ~~https://git.firstoption.com/timconsidine/Cloudron-Pandoc-PDF-Builder~~

                          https://git.cloudron.io/timconsidine/cloudron-pandoc-pdf-builder/

                          Feel free to use.
                          Let me know any errors or issues.

                          I will look into making it a node express project later.

                          timconsidineT 1 Reply Last reply
                          1
                          • timconsidineT timconsidine

                            @timconsidine I have created a public repository at ~~https://git.firstoption.com/timconsidine/Cloudron-Pandoc-PDF-Builder~~

                            https://git.cloudron.io/timconsidine/cloudron-pandoc-pdf-builder/

                            Feel free to use.
                            Let me know any errors or issues.

                            I will look into making it a node express project later.

                            timconsidineT Offline
                            timconsidineT Offline
                            timconsidine
                            App Dev
                            wrote on last edited by timconsidine
                            #16

                            @timconsidine oooops, appears to be an issue when downloading.
                            Will fix that and advise
                            EDIT : there appears to be a problem downloading on first run. But it works on subsequent runs. For now, just press back in browser, return home, and run again if error screen appears. Will investigate further, but basically working with this work-around. May be an issue if processing a large document, may need some some onFinish type statements somewhere.

                            1 Reply Last reply
                            0
                            • timconsidineT timconsidine

                              @nebulon said in Passing the Healthcheck on custom app:

                              if you push your current code to some public repository

                              I have solved the problems I was encountering. Phew.
                              Now in a basic working state. Not pretty but functional.

                              I will share in case it can be useful to others or there is advice on how to do it better.

                              I tried to create a project on https://git.cloudron.io to upload
                              But I got invalid namespace
                              Is creating projects on git.cloudron.io restricted ?

                              nebulonN Offline
                              nebulonN Offline
                              nebulon
                              Staff
                              wrote on last edited by
                              #17

                              @timconsidine said in Passing the Healthcheck on custom app:

                              Is creating projects on git.cloudron.io restricted ?

                              yes by default we limit new accounts to avoid spam. I have granted your gitlab account now more privileges to create projects.

                              timconsidineT 1 Reply Last reply
                              1
                              • nebulonN nebulon

                                @timconsidine said in Passing the Healthcheck on custom app:

                                Is creating projects on git.cloudron.io restricted ?

                                yes by default we limit new accounts to avoid spam. I have granted your gitlab account now more privileges to create projects.

                                timconsidineT Offline
                                timconsidineT Offline
                                timconsidine
                                App Dev
                                wrote on last edited by timconsidine
                                #18

                                @nebulon thank you, will move the repo over

                                1 Reply Last reply
                                0
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Bookmarks
                                • Search