Leo Hick
05/13/2022, 3:33 PMDerek Kershner
05/13/2022, 4:33 PMDerek Kershner
05/13/2022, 4:35 PMLeo Hick
05/13/2022, 5:08 PMDerek Kershner
05/13/2022, 5:14 PMLeo Hick
05/13/2022, 5:23 PM<https://api.mydomain.com/application1>Leo Hick
05/13/2022, 5:25 PMconst api = new Api(stack, "Api") {
customDomain: {
path: "Application1",
cdk: {
domainName: CONFIGURE THE DOMAIN
}
}
}Leo Hick
05/13/2022, 5:25 PMFrank
app
.stack(Site1Stack)
.stack(Site2Stack)
.stack(Site3Stack)
.stack(CloudFrontStack);
So in each of the Site stack, you can create a sst.Bucket to house the file; use the BucketDeployment construct to deploy ur files to the bucket (doc).
Finally, in the CloudFront stack, you create a distribution and map the s3 origins.Frank
StaticSite.Leo Hick
05/13/2022, 9:23 PMAdrián Mouly
05/23/2022, 4:52 PMAdrián Mouly
05/23/2022, 4:52 PMAdrián Mouly
05/23/2022, 4:52 PMAdrián Mouly
05/23/2022, 4:53 PMDerek Kershner
05/23/2022, 4:56 PMAdrián Mouly
05/23/2022, 4:56 PMAdrián Mouly
05/23/2022, 4:57 PMReactStaticSite to NOT create a CFront?Adrián Mouly
05/23/2022, 4:57 PMAdrián Mouly
05/23/2022, 4:58 PMDerek Kershner
05/23/2022, 4:59 PMAdrián Mouly
05/23/2022, 5:00 PMAdrián Mouly
05/23/2022, 5:37 PMdisabled .Adrián Mouly
05/23/2022, 5:37 PMAdrián Mouly
05/23/2022, 7:04 PMAdrián Mouly
05/23/2022, 7:04 PMconst assetWebsiteStack = new AssetsWebsiteStack(app, 'assetsWebsite-stack');
const testWebsiteStack = new TestWebsiteStack(app, 'testWebsite-stack');
new IssuerWebsiteStack(app, 'issuerWebsite-stack', {
assetsWebsiteBucket: assetWebsiteStack.bucket,
testWebsiteBucket: testWebsiteStack.bucket,
});Adrián Mouly
05/23/2022, 7:04 PMAdrián Mouly
05/23/2022, 7:05 PMadditionalBehaviors: {
'assets/*': {
origin: new S3Origin(props.assetsWebsiteBucket),
},
'test/*': {
origin: new S3Origin(props.testWebsiteBucket),
},
},Adrián Mouly
05/23/2022, 7:07 PMReactStaticSite like this.bucket = testWebsite.cdk.bucket;