Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions dist/fargate.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export type EnvFactory = (stack: StackConfig, defaults: Record<string, string>)
interface FargateServiceProps extends cdk.NestedStackProps {
subDomainIncludingDot?: string;
healthCheckPath?: string;
/** Container port the task listens on (ALB target group + task port mapping). Default 80. */
containerPort?: number;
stack: StackConfig;
cluster: ecs.ICluster;
certificate: acm.ICertificate;
Expand Down
3 changes: 2 additions & 1 deletion dist/fargate.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const DEFAULT_IMAGE = 'nginxdemos/hello:latest';
class FargateService extends cdk.NestedStack {
constructor(scope, id, props) {
super(scope, id, props);
const { healthCheckPath = '/health-check', imageVersion = 'latest', subDomainIncludingDot = '', stack, cluster, certificate, zone, repository, taskConfiguration, securityGroup: defaultSecurityGroup, } = props;
const { healthCheckPath = '/health-check', containerPort = 80, imageVersion = 'latest', subDomainIncludingDot = '', stack, cluster, certificate, zone, repository, taskConfiguration, securityGroup: defaultSecurityGroup, } = props;
// Compile secrets into list of mapped ecs.Secrets
const secrets = {};
const secretValues = taskConfiguration.secrets;
Expand Down Expand Up @@ -95,6 +95,7 @@ class FargateService extends cdk.NestedStack {
desiredCount,
taskImageOptions: {
image,
containerPort,
environment: taskConfiguration?.environment || {},
secrets,
},
Expand Down
4 changes: 4 additions & 0 deletions src/fargate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export type EnvFactory = (
interface FargateServiceProps extends cdk.NestedStackProps {
subDomainIncludingDot?: string
healthCheckPath?: string
/** Container port the task listens on (ALB target group + task port mapping). Default 80. */
containerPort?: number
stack: StackConfig
cluster: ecs.ICluster
certificate: acm.ICertificate
Expand Down Expand Up @@ -71,6 +73,7 @@ export class FargateService extends cdk.NestedStack {

const {
healthCheckPath = '/health-check',
containerPort = 80,
imageVersion = 'latest',
subDomainIncludingDot = '',
stack,
Expand Down Expand Up @@ -134,6 +137,7 @@ export class FargateService extends cdk.NestedStack {
desiredCount,
taskImageOptions: {
image,
containerPort,
environment: taskConfiguration?.environment || {},
secrets,
},
Expand Down
Loading