Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add .env support #93

Open
glensc opened this issue Feb 27, 2018 · 4 comments
Open

add .env support #93

glensc opened this issue Feb 27, 2018 · 4 comments

Comments

@glensc
Copy link
Contributor

glensc commented Feb 27, 2018

Looks like meli doesn't support .env file.

➔ cat .env
APP_VERSION=1

➔ cat docker-compose.yml
version: "3"

services:
  app:
    image: nginx:${APP_VERSION}

➔ meli -up

	 service=app error=originalErr:: invalid reference format
ThisErr::  :unable to pull image nginx:${APP_VERSION}➔

ps: there's \n missing from error, my bash prompt does not start on new line due that

@komuw
Copy link
Owner

komuw commented Feb 27, 2018

hi @glensc

currently meli only contains the subset of feature that I use daily.
I normally don't use .env files in my compose files.

But it looks like you do use, so I'll try and add them; I'll ping you on this issue if/when I do manage to add that feature.

@komuw
Copy link
Owner

komuw commented Mar 5, 2018

@glensc hi,
I'm trying to be super minimal with the things that I add to meli.
Which is to say, I do not want to add features unless I know they are super critical for someone; so, are .env files super critical to you or a nice to have feature?
thanks.

@glensc
Copy link
Contributor Author

glensc commented Mar 6, 2018

i'm not using this tool. but if i would, the .env loading is blocker and i can't use for all purposes without other modifications :)

@komuw
Copy link
Owner

komuw commented Apr 28, 2018

commentary(mostly to self);

  • we could read all .env files
  • parse env vars from them ,
    func parsedotenv(r io.Reader) env {
  • read compose file into a sting and call os.expandEnv on it + the parsed envs akin to;

    meli/format.go

    Line 66 in fead852

    volume = os.ExpandEnv(volume)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants