• cr1cket@sopuli.xyz
    link
    fedilink
    arrow-up
    16
    ·
    14 days ago

    Oh wow.

    That looks like an overly complicated solution to a problem that doesn’t exist. Synching stuff that is in git? Why not just use… git? Also npm… and the example has an env var named “DB_PASS” in it. You never put passwords in version control.

    • dragonfly4933@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      5
      ·
      13 days ago

      It is generally considered a bad idea to use envs for passing secrets in general since envs for process n are available to other processes which have access and permission.

    • TheCommieAxolotl@programming.devOP
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      12 days ago

      Exactly, you never check passwords into version control. The github example is not to put a .env file into a repo but to add the secrets to github’s native secret manager, which is what actions use to read envs

  • bizdelnick@lemmy.ml
    link
    fedilink
    arrow-up
    6
    arrow-down
    2
    ·
    14 days ago

    The best way to manage environment variables: don’t use environment variables.

    • PolarKraken@programming.dev
      link
      fedilink
      English
      arrow-up
      6
      ·
      13 days ago

      What do you do instead for dynamic values that are needed at runtime and inappropriate to check in to version control?

      • bizdelnick@lemmy.ml
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        9 days ago

        I’d rather prefer CI-level variables (macros?) that are not exported to the environment. Unfortunately, most CI developers don’t care about security.