import { KissDockerCompose } from 'kiss-docker-compose'
new KissDockerCompose(scope: Construct, id: string, props?: IKissDockerComposeProps)
Name | Type | Description |
---|---|---|
scope |
constructs.Construct |
- scope in which this resource is defined. |
id |
string |
- scoped id of the resource is used to prefix names to prevent naming conflicts. |
props |
IKissDockerComposeProps |
- resource properties, some of which are required. |
- Type: constructs.Construct
scope in which this resource is defined.
- Type: string
scoped id of the resource is used to prefix names to prevent naming conflicts.
- Type: IKissDockerComposeProps
resource properties, some of which are required.
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
public toString(): string
Returns a string representation of this construct.
Name | Description |
---|---|
isConstruct |
Checks if x is a construct. |
import { KissDockerCompose } from 'kiss-docker-compose'
KissDockerCompose.isConstruct(x: any)
Checks if x
is a construct.
- Type: any
Any object.
Name | Type | Description |
---|---|---|
node |
constructs.Node |
The tree node. |
ec2Instance |
aws-cdk-lib.aws_ec2.Instance |
EC2 Instance which was created. |
regionOfEC2Instances |
string |
regionOfEC2Instances is the region in which the EC2 instance will be deployed. |
regionOfECR |
string |
regionOfECR is the region from which the ECR image will be pulled. |
public readonly node: Node;
- Type: constructs.Node
The tree node.
public readonly ec2Instance: Instance;
- Type: aws-cdk-lib.aws_ec2.Instance
EC2 Instance which was created.
You may access this to get the instance's public DNS or IP
public readonly regionOfEC2Instances: string;
- Type: string
regionOfEC2Instances is the region in which the EC2 instance will be deployed.
public readonly regionOfECR: string;
- Type: string
regionOfECR is the region from which the ECR image will be pulled.
- Implemented By: IKissDockerComposeProps
Allows overriding all default code, or a subset of it.
To customize, first get the default values for these properties (which are exported) and then make modifications from there.
Name | Type | Description |
---|---|---|
dockerComposeFileAsString |
string |
Your Docker Compose file, stringified. |
ec2Instance |
aws-cdk-lib.aws_ec2.Instance |
Setting this value overrides and ignores the repositoriesForDockerComposeImages, vpc, ec2InstanceRole, and instanceSecurityGroup parameters. |
ec2InstanceRole |
aws-cdk-lib.aws_iam.Role |
Setting this overrides the template's Role with which the ec2Instance is deployed. |
eip |
aws-cdk-lib.aws_ec2.CfnEIP |
Elastic IP address is associated with the EC2 instance. |
instanceSecurityGroup |
aws-cdk-lib.aws_ec2.SecurityGroup |
Setting this overrides the template's SecurityGroup with which the ec2Instance is deployed. |
machineImage |
aws-cdk-lib.aws_ec2.IMachineImage |
machineImage used to create the EC2 Instance. |
repositoriesForDockerComposeImages |
aws-cdk-lib.aws_ecr.IRepository[] |
ECR repositories containing images used for your Docker Compose application. |
vpc |
aws-cdk-lib.aws_ec2.Vpc |
Setting this overrides the template's VPC into which the ec2Instance is deployed. |
public readonly dockerComposeFileAsString: string;
- Type: string
Your Docker Compose file, stringified.
This is copied to the EC2 instance without modification Required.
public readonly ec2Instance: Instance;
- Type: aws-cdk-lib.aws_ec2.Instance
Setting this value overrides and ignores the repositoriesForDockerComposeImages, vpc, ec2InstanceRole, and instanceSecurityGroup parameters.
This is the EC2 Instance used by this CDK.
Default: EC2Instance(this, id, props.vpc, props.ec2InstanceRole, props.instanceSecurityGroup, props.repositoriesForDockerComposeImages, ec2.InstanceSize.MICRO, this.regionOfEC2Instances, this.regionOfECR, props.dockerComposeFileAsString)
public readonly ec2InstanceRole: Role;
- Type: aws-cdk-lib.aws_iam.Role
Setting this overrides the template's Role with which the ec2Instance is deployed.
Default: Ec2InstanceRole(this, id)
public readonly eip: CfnEIP;
- Type: aws-cdk-lib.aws_ec2.CfnEIP
Elastic IP address is associated with the EC2 instance.
If no value is passed then no EIP is created and an EIP is not used.
Default: Nothing happens.
public readonly instanceSecurityGroup: SecurityGroup;
- Type: aws-cdk-lib.aws_ec2.SecurityGroup
Setting this overrides the template's SecurityGroup with which the ec2Instance is deployed.
Default: InstanceSecurityGroup(this, id, props.vpc)
public readonly machineImage: IMachineImage;
- Type: aws-cdk-lib.aws_ec2.IMachineImage
machineImage used to create the EC2 Instance.
The docs sometimes refer to this as "ImageId" or "AMI". This is used if (1) your instance was stateful, and (2) you were running Kiss-Docker-Compose already, but then (3) you updated your infrastructure, and (4) it deleted your stateful information, and now (5) you want to restore your stateful data.
Default: undefined
public readonly repositoriesForDockerComposeImages: IRepository[];
- Type: aws-cdk-lib.aws_ecr.IRepository[]
ECR repositories containing images used for your Docker Compose application.
This is primarily used for pre-pulling images before starting the application to make sure the current image is up to date. If you do not have ECR images you can leave this as an empty array - [] - or null. In these cases, no images are pulled from ECR.
Default: ECRsForDockerComposeImages(this, [])
public readonly vpc: Vpc;
- Type: aws-cdk-lib.aws_ec2.Vpc
Setting this overrides the template's VPC into which the ec2Instance is deployed.
Default: VPC(this, id)