fix: Dont bind service class methods in declaration

This was causing a bug where the applications were cloned when
restarting all of them. These clones did not carry over the binds, so
when starting the containers back up, two different versions of `this`
were being used.

Change-type: patch
Closes: #736
Signed-off-by: Cameron Diver <cameron@resin.io>
This commit is contained in:
Cameron Diver 2018-08-28 16:39:31 -07:00
parent 6f0728ba56
commit 16e102b3ba
No known key found for this signature in database
GPG Key ID: 69264F9C923F55C1

View File

@ -565,7 +565,7 @@ module.exports = class Service
volumes[vol] = {}
return { binds, volumes }
toContainerConfig: =>
toContainerConfig: ->
{ binds, volumes } = @getBindsAndVolumes()
tmpfs = {}
for dir in @tmpfs
@ -651,7 +651,7 @@ module.exports = class Service
return conf
# TODO: when we support network configuration properly, return endpointConfig: conf
extraNetworksToJoin: =>
extraNetworksToJoin: ->
_.map _.pickBy(@networks, (conf, net) => net != @networkMode), (conf, net) ->
return { name: net, endpointConfig: {} }