@kapeta/local-cluster-service 0.5.2 → 0.5.3
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/containerManager.js +7 -1
- package/src/operatorManager.js +3 -2
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## [0.5.3](https://github.com/kapetacom/local-cluster-service/compare/v0.5.2...v0.5.3) (2023-06-09)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* Make sure bound ports are exposed and ([#29](https://github.com/kapetacom/local-cluster-service/issues/29)) ([fe088b4](https://github.com/kapetacom/local-cluster-service/commit/fe088b424fa159ca1d04e721ace4558a778c5dcd))
|
7
|
+
|
1
8
|
## [0.5.2](https://github.com/kapetacom/local-cluster-service/compare/v0.5.1...v0.5.2) (2023-06-06)
|
2
9
|
|
3
10
|
|
package/package.json
CHANGED
package/src/containerManager.js
CHANGED
@@ -54,6 +54,8 @@ class ContainerManager {
|
|
54
54
|
// Default http
|
55
55
|
{ protocol: 'http', host: 'localhost', port: 2375 },
|
56
56
|
{ protocol: 'https', host: 'localhost', port: 2376 },
|
57
|
+
{ protocol: 'http', host: '127.0.0.1', port: 2375 },
|
58
|
+
{ protocol: 'https', host: '127.0.0.1', port: 2376 },
|
57
59
|
];
|
58
60
|
for (const opts of connectOptions) {
|
59
61
|
try {
|
@@ -197,7 +199,10 @@ class ContainerManager {
|
|
197
199
|
|
198
200
|
console.log('Image pulled: %s', image);
|
199
201
|
|
202
|
+
const ExposedPorts = {};
|
203
|
+
|
200
204
|
_.forEach(opts.ports, (portInfo, containerPort) => {
|
205
|
+
ExposedPorts['' + containerPort] = {};
|
201
206
|
PortBindings['' + containerPort] = [
|
202
207
|
{
|
203
208
|
HostPort: '' + portInfo.hostPort,
|
@@ -219,11 +224,12 @@ class ContainerManager {
|
|
219
224
|
if (opts.health) {
|
220
225
|
HealthCheck = this.toDockerHealth(opts.health);
|
221
226
|
}
|
222
|
-
|
223
227
|
const dockerContainer = await this.startContainer({
|
224
228
|
name: name,
|
225
229
|
Image: image,
|
226
230
|
Labels,
|
231
|
+
Cmd: opts.cmd,
|
232
|
+
ExposedPorts,
|
227
233
|
Env,
|
228
234
|
HealthCheck,
|
229
235
|
HostConfig: {
|
package/src/operatorManager.js
CHANGED
@@ -88,7 +88,7 @@ class OperatorManager {
|
|
88
88
|
const dbName = name + '_' + fromServiceId.replace(/[^a-z0-9]/gi, '');
|
89
89
|
|
90
90
|
return {
|
91
|
-
host: environment === 'docker' ? 'host.docker.internal' : '
|
91
|
+
host: environment === 'docker' ? 'host.docker.internal' : '127.0.0.1',
|
92
92
|
port: portInfo.hostPort,
|
93
93
|
type: portType,
|
94
94
|
protocol: portInfo.protocol,
|
@@ -163,7 +163,8 @@ class OperatorManager {
|
|
163
163
|
mounts,
|
164
164
|
ports,
|
165
165
|
health: operatorData.health,
|
166
|
-
env: operatorData.env
|
166
|
+
env: operatorData.env,
|
167
|
+
cmd: operatorData.cmd
|
167
168
|
});
|
168
169
|
}
|
169
170
|
|