GithubHelp home page GithubHelp logo

Comments (5)

josegonzalez avatar josegonzalez commented on May 28, 2024

I think we should also handle:

  • merging the values onto the existing by default. If you have a KEY=VALUE already specified and the .env path has a KEY=VALUE2, we would set KEY=VALUE2
  • --replace: setting this flag would completely replace all existing environment variables. This wouldn't be default, as it would impact usage of stuff like service linking (and maybe we need to overhaul that)
  • This should support stdin via a - (dash) so you could do config:import $APP - to read in env vars. This is particularly useful if the file in question is local and the command is performed via ssh, or if the file is on the host but isn't owned by the dokku user (or otherwise unreadable).

from dokku.

PapePathe avatar PapePathe commented on May 28, 2024

Hey i am have some interest working on this issue. @lasroun what format do you have in mind for the .env file ?

from dokku.

josegonzalez avatar josegonzalez commented on May 28, 2024

@PapePathe i think we already import a goenv library, so whatever format that supports is probably lowest friction.

from dokku.

PapePathe avatar PapePathe commented on May 28, 2024

Great, i will look into the source code and see where i can start.

from dokku.

PapePathe avatar PapePathe commented on May 28, 2024

Can you assign the story to me please.

Also i have a couple of questions. On my fork i have the version with dokku config:import <app-name> /path/to/.env working and go tests passing. After making sure the import file is valid, i reused the SetMany function to apply the changes to the app's env.

How do you feel about that? Does the SetMany supports the case of merging the values on the existing by default ?
I do not quite get the stdin support part, but i am interested in adding support for it since it find it very useful.
Given we plan to have the --replace flag should we i using SetMany ?

I think we should also handle:

  • merging the values onto the existing by default. If you have a KEY=VALUE already specified and the .env path has a KEY=VALUE2, we would set KEY=VALUE2
  • --replace: setting this flag would completely replace all existing environment variables. This wouldn't be default, as it would impact usage of stuff like service linking (and maybe we need to overhaul that)
  • This should support stdin via a - (dash) so you could do config:import $APP - to read in env vars. This is particularly useful if the file in question is local and the command is performed via ssh, or if the file is on the host but isn't owned by the dokku user (or otherwise unreadable).

from dokku.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.