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. Leantime
  3. ENV file is reset on app restart

ENV file is reset on app restart

Scheduled Pinned Locked Moved Unsolved Leantime
6 Posts 2 Posters 878 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.
    • KinziK Offline
      KinziK Offline
      Kinzi
      wrote on last edited by
      #1

      I'm trying to change some vars in the ENV file via the app filemanager.
      Unfortunately, when I restart the app (to see the changes) the ENV file gets reset to the default values.

      Is this a bug or am I doing anything wrong?

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

        Hm so there is one env file which has Cloudron specific configs, that is put into /run/leantime/env and then the file at /app/data/env is appended to it on startup: https://git.cloudron.io/cloudron/leantime-app/-/blob/main/start.sh?ref_type=heads#L38

        Does that explain the situation you are seeing or is there maybe some bug in the startup script?

        1 Reply Last reply
        2
        • nebulonN nebulon marked this topic as a question on
        • KinziK Offline
          KinziK Offline
          Kinzi
          wrote on last edited by Kinzi
          #3

          Not an expert, but the way I'm reading this(https://git.cloudron.io/cloudron/leantime-app/-/blob/main/start.sh) is:

          You

          • copy /app/code/config/sample.env into the app directory
          • then update the DB relevant vars and a few more to make the app work
          • do this on every startup.

          Then yes: this explains the behavior.

          However, the question remains: how would I update some of the env vars myself so that they are persisted?

          I don't think editing your start.sh would be a good idea, would it?

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

            Oh! I see now, the package copies over that sample file on every restart. This is a logic bug there, I will fixup the package to behave like the usual pattern instead.

            Thanks for pointing that out!

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

              The latest app package now will retain custom env vars in /app/data/env. Note that env vars which are required by Cloudron will get overwritten during startup so those cannot be customized. Currently, those are https://git.cloudron.io/cloudron/leantime-app/-/blob/main/start.sh?ref_type=heads#L46

              1 Reply Last reply
              0
              • KinziK Offline
                KinziK Offline
                Kinzi
                wrote on last edited by
                #6

                Great @nebulon that should do. Will check right away!

                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