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
  • Brite
  • 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 - Status | 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 Leantime
6 Posts 2 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.
  • 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 Away
      nebulonN Away
      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 Away
          nebulonN Away
          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 Away
            nebulonN Away
            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
              • girishG girish marked this topic as a regular topic on

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              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