mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-29 18:18:52 +00:00
Merge pull request #141 from resin-io/124-add-appid-env-var
Add RESIN_APP_ID variable
This commit is contained in:
commit
8145f5632d
@ -1,3 +1,4 @@
|
||||
* Add RESIN_APP_ID variable [Pablo]
|
||||
* Increase delta request timeout to 15 minutes [Pablo]
|
||||
|
||||
# v1.8.0
|
||||
|
@ -468,7 +468,7 @@ getEnvAndFormatRemoteApps = (deviceId, remoteApps, uuid, apiKey) ->
|
||||
getEnvironment(app.id, deviceId, apiKey)
|
||||
.then (environment) ->
|
||||
app.environment_variable = environment
|
||||
utils.extendEnvVars(app.environment_variable, uuid)
|
||||
utils.extendEnvVars(app.environment_variable, uuid, app.id)
|
||||
.then (fullEnv) ->
|
||||
env = _.omit(fullEnv, _.keys(specialActionEnvVars))
|
||||
env = _.omit env, (v, k) ->
|
||||
|
@ -130,9 +130,10 @@ exports.getConfig = getConfig = (key) ->
|
||||
.then ([ conf ]) ->
|
||||
return conf?.value
|
||||
|
||||
exports.extendEnvVars = (env, uuid) ->
|
||||
exports.extendEnvVars = (env, uuid, appId) ->
|
||||
host = '127.0.0.1'
|
||||
newEnv =
|
||||
RESIN_APP_ID: appId.toString()
|
||||
RESIN_DEVICE_UUID: uuid
|
||||
RESIN_SUPERVISOR_ADDRESS: "http://#{host}:#{config.listenPort}"
|
||||
RESIN_SUPERVISOR_HOST: host
|
||||
|
Loading…
Reference in New Issue
Block a user