mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-20 14:13:08 +00:00
Auto-merge for PR #724 via VersionBot
fix: Apply device name before generating container config
This commit is contained in:
commit
233f4af1df
@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
|
||||
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
|
||||
This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## v7.16.5 - 2018-08-13
|
||||
|
||||
* Fix: Apply device name before generating container config #724 [Cameron Diver]
|
||||
|
||||
## v7.16.4 - 2018-08-07
|
||||
|
||||
* Fix: Restart a service when it's memory limit changes #721 [Cameron Diver]
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "resin-supervisor",
|
||||
"description": "This is resin.io's Supervisor, a program that runs on IoT devices and has the task of running user Apps (which are Docker containers), and updating them as Resin's API informs it to.",
|
||||
"version": "7.16.4",
|
||||
"version": "7.16.5",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -101,24 +101,25 @@ module.exports = class ServiceManager extends EventEmitter
|
||||
return @docker.getContainer(existingService.containerId)
|
||||
.catch NotFoundError, =>
|
||||
|
||||
conf = service.toContainerConfig()
|
||||
nets = service.extraNetworksToJoin()
|
||||
|
||||
@config.get('name')
|
||||
.then (deviceName) =>
|
||||
|
||||
service.environment['RESIN_DEVICE_NAME_AT_INIT'] = deviceName
|
||||
|
||||
conf = service.toContainerConfig()
|
||||
nets = service.extraNetworksToJoin()
|
||||
|
||||
@logger.logSystemEvent(logTypes.installService, { service })
|
||||
@reportNewStatus(mockContainerId, service, 'Installing')
|
||||
|
||||
@docker.createContainer(conf)
|
||||
.tap (container) =>
|
||||
service.containerId = container.id
|
||||
.tap (container) =>
|
||||
service.containerId = container.id
|
||||
|
||||
Promise.map nets, ({ name, endpointConfig }) =>
|
||||
@docker
|
||||
.getNetwork(name)
|
||||
.connect({ Container: container.id, EndpointConfig: endpointConfig })
|
||||
Promise.map nets, ({ name, endpointConfig }) =>
|
||||
@docker
|
||||
.getNetwork(name)
|
||||
.connect({ Container: container.id, EndpointConfig: endpointConfig })
|
||||
.tap =>
|
||||
@logger.logSystemEvent(logTypes.installServiceSuccess, { service })
|
||||
.tapCatch (err) =>
|
||||
|
Loading…
Reference in New Issue
Block a user