Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Environment variables in .json files? #262

Open
kaspro opened this issue Aug 28, 2014 · 3 comments
Open

Environment variables in .json files? #262

kaspro opened this issue Aug 28, 2014 · 3 comments

Comments

@kaspro
Copy link

kaspro commented Aug 28, 2014

In addition to issue #208(closed) - is there a possibility to put everything necessary (including environment variables: -e VAR=SOMETHING) into the .json file?

Thanks in advance,
Chris

@kaspro
Copy link
Author

kaspro commented Aug 28, 2014

Sorry I have missed issue #217 , seems this is implemented and working fine.
Can we add this to one or more examples - I haven't found a hint on that anywhere else.

"environment": [
{
"name": "TEST_VAR",
"value": "hello"
},
{
"name": "FOO",
"value": "bar"
}
]

Cheers,
Chris

@ignaciorivmen
Copy link

I have the same problem i'm trying to deploy two Apis, the test and the development one, but i can't see the enviroment variables inside the container when i type the env command.

This is my .json file:

{
"containers":[
{
"Name": "apidev",
"Image": "app",
"PublicPorts": [
{ "Internal": 3000, "External":5000}
],
"Count": 1,
"Env": [
{
"name": "RAILS_ENV",
"value": "development"
}
]
},

{
  "Name": "apitest",
  "Image": "app",
  "Count":1,
  "PublicPorts": [
    { "Internal": 3000, "External":5001}
  ],
  "environment": [
    {
       "name": "RAILS_ENV",
       "value": "test"
    }
  ]
}

]
}

I think it's fine and i dont find the problem anywhere.

@ignaciorivmen
Copy link

Ok, thats was working from the beginning but if you enter the container with the nsenter command, you can't see the deployed environment variables on it, only the system ones.

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

No branches or pull requests

2 participants