presidium 0.18.2 → 0.18.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/DockerService.js CHANGED
@@ -134,10 +134,8 @@ DockerService.prototype.deploy = async function deploy() {
134
134
  throw new Error(await response.text())
135
135
  }
136
136
  } else {
137
- await this.synchronize()
138
137
  await this.update(this.serviceOptions)
139
138
  }
140
- await this.synchronize()
141
139
  }
142
140
 
143
141
  // new DockerService().synchronize() -> Promise<>
@@ -193,6 +191,7 @@ DockerService.prototype.synchronize = function dockerServiceSynchronize() {
193
191
  */
194
192
 
195
193
  DockerService.prototype.update = async function update(options) {
194
+ await this.synchronize()
196
195
  return this.docker.updateService(this.name, {
197
196
  ...options,
198
197
  spec: this.spec,
@@ -39,32 +39,30 @@ const test = new Test('DockerService', DockerService)
39
39
  assert.equal(info.Spec.RollbackConfig.MaxFailureRatio, 0.15)
40
40
  }
41
41
 
42
- {
43
- const result = await myService.update({
44
- labels: { foo: 'bar' },
45
- replicas: 2,
46
- updateParallelism: 3,
47
- updateDelay: 2e9,
48
- updateFailureAction: 'continue',
49
- updateMonitor: 30e9,
50
- updateMaxFailureRatio: 0.3,
51
- rollbackParallelism: 3,
52
- rollbackDelay: 2e9,
53
- rollbackFailureAction: 'continue',
54
- rollbackMonitor: 30e9,
55
- rollbackMaxFailureRatio: 0.3,
56
- env: { FOO: 'foo' },
57
- workdir: '/opt',
58
- mounts: [{
59
- source: 'other-volume',
60
- target: '/opt/other-volume',
61
- }],
62
- publish: { 8080: 80 },
63
- healthCmd: ['curl', '0.0.0.0:80'],
64
- restart: 'on-failure:5',
65
- memory: 512e6, // bytes
66
- })
67
- }
42
+ await myService.update({
43
+ labels: { foo: 'bar' },
44
+ replicas: 2,
45
+ updateParallelism: 3,
46
+ updateDelay: 2e9,
47
+ updateFailureAction: 'continue',
48
+ updateMonitor: 30e9,
49
+ updateMaxFailureRatio: 0.3,
50
+ rollbackParallelism: 3,
51
+ rollbackDelay: 2e9,
52
+ rollbackFailureAction: 'continue',
53
+ rollbackMonitor: 30e9,
54
+ rollbackMaxFailureRatio: 0.3,
55
+ env: { FOO: 'foo' },
56
+ workdir: '/opt',
57
+ mounts: [{
58
+ source: 'other-volume',
59
+ target: '/opt/other-volume',
60
+ }],
61
+ publish: { 8080: 80 },
62
+ healthCmd: ['curl', '0.0.0.0:80'],
63
+ restart: 'on-failure:5',
64
+ memory: 512e6, // bytes
65
+ })
68
66
 
69
67
  {
70
68
  const info = await myService.inspect()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "presidium",
3
- "version": "0.18.2",
3
+ "version": "0.18.5",
4
4
  "description": "A library for creating web services",
5
5
  "author": "Richard Tong",
6
6
  "license": "MIT",