mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-01 19:46:44 +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]
|
* Increase delta request timeout to 15 minutes [Pablo]
|
||||||
|
|
||||||
# v1.8.0
|
# v1.8.0
|
||||||
|
@ -468,7 +468,7 @@ getEnvAndFormatRemoteApps = (deviceId, remoteApps, uuid, apiKey) ->
|
|||||||
getEnvironment(app.id, deviceId, apiKey)
|
getEnvironment(app.id, deviceId, apiKey)
|
||||||
.then (environment) ->
|
.then (environment) ->
|
||||||
app.environment_variable = environment
|
app.environment_variable = environment
|
||||||
utils.extendEnvVars(app.environment_variable, uuid)
|
utils.extendEnvVars(app.environment_variable, uuid, app.id)
|
||||||
.then (fullEnv) ->
|
.then (fullEnv) ->
|
||||||
env = _.omit(fullEnv, _.keys(specialActionEnvVars))
|
env = _.omit(fullEnv, _.keys(specialActionEnvVars))
|
||||||
env = _.omit env, (v, k) ->
|
env = _.omit env, (v, k) ->
|
||||||
|
@ -130,9 +130,10 @@ exports.getConfig = getConfig = (key) ->
|
|||||||
.then ([ conf ]) ->
|
.then ([ conf ]) ->
|
||||||
return conf?.value
|
return conf?.value
|
||||||
|
|
||||||
exports.extendEnvVars = (env, uuid) ->
|
exports.extendEnvVars = (env, uuid, appId) ->
|
||||||
host = '127.0.0.1'
|
host = '127.0.0.1'
|
||||||
newEnv =
|
newEnv =
|
||||||
|
RESIN_APP_ID: appId.toString()
|
||||||
RESIN_DEVICE_UUID: uuid
|
RESIN_DEVICE_UUID: uuid
|
||||||
RESIN_SUPERVISOR_ADDRESS: "http://#{host}:#{config.listenPort}"
|
RESIN_SUPERVISOR_ADDRESS: "http://#{host}:#{config.listenPort}"
|
||||||
RESIN_SUPERVISOR_HOST: host
|
RESIN_SUPERVISOR_HOST: host
|
||||||
|
Loading…
Reference in New Issue
Block a user