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

    Solved Move file in directus app: read-only file system

    Directus
    3
    13
    557
    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.
    • D
      devtron last edited by

      Unfortunately, I can't move a file (snapshot.yaml) from /tmp to my desired destination in the directus app:

      mv: inter-device move failed: 'tmp/snapshot.yaml' to 'app/snapshot.yaml'; unable to remove target: Read-only file system
      

      Can I disable read-only to move the file temporarly?

      1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff @devtron last edited by

        @devtron the DB_CLIENT is set and configured in the /app/pkg/start.sh which also sets up other required settings. So while having the app in debug mode, you either have to run relevant pre-setup commands required for npx directus schema apply or put that line at the correct place in /app/pkg/start.sh and run that whole script.

        For redis, you can check the services view in your dashboard and manually start it from there first.

        D 1 Reply Last reply Reply Quote 1
        • D
          devtron last edited by

          This worked:

          mv -b tmp/snapshot.yaml /app/...
          

          But curious to know if I am able to disable it.

          1 Reply Last reply Reply Quote 0
          • D
            devtron last edited by devtron

            I can't apply my scheme to directus:

            root@...:/app/data# npx directus schema apply snapshot.yaml 
            npm ERR! code EROFS
            npm ERR! syscall open
            npm ERR! path /root/.npm/_cacache/tmp/e889ceb7
            npm ERR! errno EROFS
            npm ERR! rofs Invalid response body while trying to fetch https://registry.npmjs.org/directus: EROFS: read-only file system, open '/root/.npm/_cacache/tmp/e889ceb7'
            npm ERR! rofs Often virtualized file systems, or other file systems
            npm ERR! rofs that don't support symlinks, give this error.
            
            1 Reply Last reply Reply Quote 0
            • D
              devtron last edited by

              Still have this issue...

              nebulon 1 Reply Last reply Reply Quote 0
              • Moved from Support by  girish girish 
              • nebulon
                nebulon Staff @devtron last edited by

                @devtron on Cloudron all apps run in a read-only filesystem, causing this issue. However for things which need to be writeable, we link them into to the read/write section.
                What is the use-case, requiring you to move the snapshot.yaml ?

                D 1 Reply Last reply Reply Quote 0
                • D
                  devtron @nebulon last edited by

                  @nebulon The use-case is to import my schema (snapshot.yaml) from my local development into the prod environment (cloudron app instance). And vice versa.
                  In fact, I need to import into the app only once, because I already created my schema locally. It would be tedious to define everything in the app again.

                  MooCloud_Matt nebulon 2 Replies Last reply Reply Quote 0
                  • MooCloud_Matt
                    MooCloud_Matt @devtron last edited by

                    @devtron
                    I think that was a feature in version 8 or lower but is really interesting if it's still supported, can post the link to the documentation.

                    Matteo. R.
                    Founder and Tech-Support Manager.
                    MooCloud MSP
                    Swiss Managed Service Provider

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      devtron @MooCloud_Matt last edited by

                      @moocloud_matt
                      Here is the link for their newest version 9
                      https://docs.directus.io/reference/cli/#snapshot-the-data-model

                      I am also using Directus 9 and used it during their rc-phase

                      MooCloud_Matt 1 Reply Last reply Reply Quote 1
                      • MooCloud_Matt
                        MooCloud_Matt @devtron last edited by

                        @devtron
                        Nice, the old version has a dedicated page on it, and I didn't find it on the new documentation.

                        Matteo. R.
                        Founder and Tech-Support Manager.
                        MooCloud MSP
                        Swiss Managed Service Provider

                        1 Reply Last reply Reply Quote 0
                        • nebulon
                          nebulon Staff @devtron last edited by

                          @devtron said in Move file in directus app: read-only file system:

                          @nebulon The use-case is to import my schema (snapshot.yaml) from my local development into the prod environment (cloudron app instance). And vice versa.
                          In fact, I need to import into the app only once, because I already created my schema locally. It would be tedious to define everything in the app again.

                          ah I see, if this is a one-time task, you could also put the app in debug mode, which makes the filesystems temporarily read/write (but not persistent across restarts)

                          D 1 Reply Last reply Reply Quote 1
                          • D
                            devtron @nebulon last edited by

                            @nebulon I put the app in recovery/debug mode. It became writable but got another issue:

                            "DB_CLIENT" Environment Variable is missing.
                            

                            fb424e83-ce86-4db7-8949-b1a2536202e9-image.png

                            I've tried to add the changes in the env file in app/data. It didn't work. After that I tried to start it normally and got a new error with redis:

                            ec91e9ce-c7d0-4d33-8295-10a18b9d28af-image.png

                            😅

                            nebulon 1 Reply Last reply Reply Quote 0
                            • nebulon
                              nebulon Staff @devtron last edited by

                              @devtron the DB_CLIENT is set and configured in the /app/pkg/start.sh which also sets up other required settings. So while having the app in debug mode, you either have to run relevant pre-setup commands required for npx directus schema apply or put that line at the correct place in /app/pkg/start.sh and run that whole script.

                              For redis, you can check the services view in your dashboard and manually start it from there first.

                              D 1 Reply Last reply Reply Quote 1
                              • D
                                devtron @nebulon last edited by

                                @nebulon Alright, got it. Thank you!

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