UNPKG

compose-as-code

Version:

Provides a module to express docker compose files as code

44 lines (43 loc) 1.69 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Service = void 0; class Service { constructor(scope, logicalId, props) { this.id = `${scope.id}${logicalId}`; this.image = props.image; this.pullPolicy = props.pullPolicy; this.restart = props.restart; this.expose = props.expose; this.ports = props.ports; this.healthCheck = props.healthCheck; this.environment = props.environment; this.cpuCount = props.cpuCount; this.cpuPercent = props.cpuPercent; this.cpuShares = props.cpuShares; this.cpuPeriod = props.cpuPeriod; this.cpuQuota = props.cpuQuota; this.cpuRtRuntime = props.cpuRtRuntime; this.cpuPeriod = props.cpuPeriod; this.deviceReadBps = props.deviceReadBps; this.deviceWriteBps = props.deviceWriteBps; this.deviceReadIops = props.deviceReadIops; this.deviceWriteIops = props.deviceWriteIops; this.memReservation = props.memReservation; this.weight = props.weight; this.weightDevice = props.weightDevice; this.capAdd = props.capAdd; this.capDrop = props.capDrop; this.deploy = props.deploy; this.securityOpt = props.securityOpt; this.cgroupParent = props.cgroupParent; this.memLimit = props.memLimit; this.containerName = props.containerName; this.entryPoint = props.entryPoint; this.command = props.command; this.dependsOn = props.dependsOn; this.networks = props.networks; this.volumes = props.volumes; scope.services.push(this); } } exports.Service = Service;