dcl-ops-lib 6.1.1 → 6.1.2

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.
@@ -243,10 +243,13 @@ function createFargateTask(serviceName, dockerImage, dockerListeningPort, enviro
243
243
  for (let extraALBMapping of extraALBMappings) {
244
244
  const exposedExtra = yield (0, exposePublicService_1.exposePublicService)(`${serviceName}-${extraALBMapping.dockerListeningPort}-${version}`, extraALBMapping.domain, extraALBMapping.dockerListeningPort, extraALBMapping.healthCheck, vpc.id, extraALBMapping.extraExposedServiceOptions);
245
245
  targetGroups.push(exposedExtra.targetGroup);
246
- extraPortMappings.push({
247
- containerPort: extraALBMapping.dockerListeningPort,
248
- hostPort: extraALBMapping.dockerListeningPort,
249
- });
246
+ // we have to do this check because the port might have been added to the array before if it's included in ECS_PROMETHEUS_EXPORTER_PORT
247
+ if (!extraPortMappings.find((port) => port.hostPort === extraALBMapping.dockerListeningPort)) {
248
+ extraPortMappings.push({
249
+ containerPort: extraALBMapping.dockerListeningPort,
250
+ hostPort: extraALBMapping.dockerListeningPort,
251
+ });
252
+ }
250
253
  }
251
254
  const portMapping = { containerPort: dockerListeningPort, hostPort: dockerListeningPort };
252
255
  // make the service accesible by the ALB
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dcl-ops-lib",
3
- "version": "6.1.1",
3
+ "version": "6.1.2",
4
4
  "scripts": {
5
5
  "build": "tsc && cp bin/* . && node test.js",
6
6
  "clean": "rm *.d.ts *.js *.js.map"