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. HELP : Packaging CodeX Docs for Cloudron

HELP : Packaging CodeX Docs for Cloudron

Scheduled Pinned Locked Moved App Packaging & Development
7 Posts 2 Posters 1.1k 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.
    • timconsidineT Offline
      timconsidineT Offline
      timconsidine
      App Dev
      wrote on last edited by timconsidine
      #1

      I'm making a custom package for Codex Docs https://github.com/codex-team/codex.docs

      BUT ... I can't fix an issue.
      I've stared at it and taken different approaches, but not getting anywhere.
      So putting it out for someone to take a look if they want.

      My repo is at https://git.cloudron.io/timconsidine/codexdocs-cloudron.

      Problems are listed in DEV-STATUS file, but repeated here.
      It may be a stupid simple mistake by me 😊 but I can't see it.
      There may be a more fundamental problem.

      So I am calling in the cavalry, and maybe someone else can see the issue.

      STATUS : 
      
      * App builds installs and runs
      
      PROBLEM : 
      
      * Creating pages fails, with local storage and with mongodb database.
      * User logs in with Cloudron username/password
      * Empty app displayed with button to `Add a Page`
      * App has an extra password for editing : set for now as `codex`
      * App accepts edit password, but returns user to same initial page
      * App does not create a new page
      
      This behaviour is present both when using local file storage for pages, and when using mongodb connection.
      
      Current setup is to use mongodb
      The `start.sh` file should create an environment variable with db connection.
      The connection string is correct.
      But the env variable is empty.
      
      Even populating the env variable manually in Terminal when the app is running does not then allow to create a page.
      
      There may be other errors not yet discovered because user cannot get beyond adding a page.
      
      
      1 Reply Last reply
      1
      • robiR Offline
        robiR Offline
        robi
        wrote on last edited by
        #2

        Does it need write access to the fs for anything? Might be ro fs related.

        Conscious tech

        timconsidineT 1 Reply Last reply
        0
        • robiR robi

          Does it need write access to the fs for anything? Might be ro fs related.

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

          @robi good question

          I've separated out /app/code and /app/data
          I've checked this (what feels like) a million times but may have missed something.
          And using the database connection should mitigate the need for filesystem access.

          The logs don't show anything significant, which I would expect if there was an attempt but a failure to write something.

          I have installed CodeX Docs on Easypanel and tried to compare what happens there.
          Logs are very similar.

          Browser Dev Tools says there is a problem with cookie values, but the same is said when running the Easypanel deployment, which succeeds in creating and editing pages, so I don't think it is down to that.

          1 Reply Last reply
          0
          • robiR Offline
            robiR Offline
            robi
            wrote on last edited by
            #4

            See what other ENV vars there might be to set, if nothing else, HOME=/app/data

            Conscious tech

            1 Reply Last reply
            1
            • timconsidineT Offline
              timconsidineT Offline
              timconsidine
              App Dev
              wrote on last edited by timconsidine
              #5

              Update :
              After lots of debugging and trying different approaches, I am fairly confident that the packaging is correct.
              BUT ... it seems the source repo doesn't actually create a DB or tables when the config says use mongodb.
              But I might be wrong, as it doesn't work when using local storage either.
              Going to have to look further in the source repo ...

              EDIT : correction, the DB code is there it is just not built automatically, so need to work out how to package it

              1 Reply Last reply
              2
              • timconsidineT Offline
                timconsidineT Offline
                timconsidine
                App Dev
                wrote on last edited by
                #6

                So ... I am fairly sure that the problem in getting this working are due to the storage creation not working at runtime.
                This is whether it is set to mongodb or local.
                I have tried to build a script which "re-runs" the storage creation as part of start.sh but it's not working, and I am not a node developer.

                It may be a fault of the packaging approach I have taken, but I followed the instructions closely (I Think!).

                So with a heavy heart, I am parking this packaging for now.
                Shame, as I really want it on Cloudron.
                But I have it working in a native Docker/Traefik deployment and on Easypanel, so the RoE (return on effort) is diminishing fast.

                If anyone want to take over the package and fix it, whether my errors or the post-install storage building, do feel free !

                1 Reply Last reply
                2
                • robiR Offline
                  robiR Offline
                  robi
                  wrote on last edited by
                  #7

                  Perhaps @nebulon can take a look

                  Conscious tech

                  1 Reply Last reply
                  1
                  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