cdk-nextjs 0.3.10 → 0.4.0
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.
- package/.jsii +1316 -781
- package/API.md +1067 -532
- package/README.md +4 -5
- package/assets/lambdas/assets-deployment/assets-deployment.lambda/assets-deployment.Dockerfile +12 -8
- package/assets/lambdas/assets-deployment/assets-deployment.lambda/index.js +68 -57
- package/assets/lambdas/post-deploy/post-deploy.lambda/index.js +246 -0
- package/docs/breaking-changes.md +9 -0
- package/docs/notes.md +170 -20
- package/examples/README.md +2 -2
- package/lib/constants.d.ts +32 -0
- package/lib/constants.js +38 -0
- package/lib/generated-structs/OptionalCustomResourceProps.d.ts +104 -0
- package/lib/generated-structs/OptionalCustomResourceProps.js +3 -0
- package/lib/generated-structs/OptionalDockerImageAssetProps.d.ts +21 -0
- package/lib/generated-structs/OptionalDockerImageAssetProps.js +1 -1
- package/lib/generated-structs/OptionalNextjsAssetsDeploymentProps.d.ts +9 -3
- package/lib/generated-structs/OptionalNextjsAssetsDeploymentProps.js +1 -1
- package/lib/generated-structs/OptionalNextjsBuildProps.d.ts +1 -1
- package/lib/generated-structs/OptionalNextjsBuildProps.js +1 -1
- package/lib/generated-structs/OptionalNextjsContainersProps.d.ts +3 -3
- package/lib/generated-structs/OptionalNextjsContainersProps.js +1 -1
- package/lib/generated-structs/OptionalNextjsPostDeployProps.d.ts +42 -0
- package/lib/generated-structs/OptionalNextjsPostDeployProps.js +3 -0
- package/lib/generated-structs/OptionalPostDeployCustomResourceProperties.d.ts +41 -0
- package/lib/generated-structs/OptionalPostDeployCustomResourceProperties.js +4 -0
- package/lib/index.d.ts +6 -5
- package/lib/index.js +6 -8
- package/lib/lambdas/assets-deployment/assets-deployment.lambda.js +5 -23
- package/lib/lambdas/assets-deployment/fs-to-fs.js +18 -3
- package/lib/lambdas/assets-deployment/fs-to-s3.d.ts +8 -2
- package/lib/lambdas/assets-deployment/fs-to-s3.js +15 -9
- package/lib/lambdas/post-deploy/create-invalidation.d.ts +2 -0
- package/lib/lambdas/post-deploy/create-invalidation.js +19 -0
- package/lib/lambdas/post-deploy/post-deploy-function.d.ts +13 -0
- package/lib/lambdas/post-deploy/post-deploy-function.js +22 -0
- package/lib/lambdas/post-deploy/post-deploy.lambda.d.ts +9 -0
- package/lib/lambdas/post-deploy/post-deploy.lambda.js +56 -0
- package/lib/lambdas/post-deploy/prune-fs.d.ts +10 -0
- package/lib/lambdas/post-deploy/prune-fs.js +33 -0
- package/lib/lambdas/post-deploy/prune-s3.d.ts +15 -0
- package/lib/lambdas/post-deploy/prune-s3.js +101 -0
- package/lib/lambdas/utils.js +35 -0
- package/lib/nextjs-assets-deployment.d.ts +20 -51
- package/lib/nextjs-assets-deployment.js +32 -26
- package/lib/nextjs-build/builder.Dockerfile +12 -8
- package/lib/nextjs-build/cdk-nextjs-cache-handler.cjs +63 -0
- package/lib/nextjs-build/cdk-nextjs-cache-handler.d.ts +21 -0
- package/lib/nextjs-build/cdk-nextjs-cache-handler.js +49 -0
- package/lib/nextjs-build/global-containers.Dockerfile +29 -19
- package/lib/nextjs-build/global-functions.Dockerfile +30 -24
- package/lib/nextjs-build/nextjs-build.d.ts +51 -26
- package/lib/nextjs-build/nextjs-build.js +108 -88
- package/lib/nextjs-build/regional-containers.Dockerfile +30 -20
- package/lib/nextjs-compute/nextjs-compute-base-props.d.ts +0 -1
- package/lib/nextjs-compute/nextjs-compute-base-props.js +1 -1
- package/lib/nextjs-compute/nextjs-containers.d.ts +2 -1
- package/lib/nextjs-compute/nextjs-containers.js +7 -5
- package/lib/nextjs-compute/nextjs-functions.d.ts +1 -0
- package/lib/nextjs-compute/nextjs-functions.js +8 -11
- package/lib/nextjs-distribution.d.ts +1 -1
- package/lib/nextjs-distribution.js +5 -8
- package/lib/nextjs-file-system.js +1 -1
- package/lib/nextjs-post-deploy.d.ts +101 -0
- package/lib/nextjs-post-deploy.js +78 -0
- package/lib/nextjs-static-assets.js +1 -1
- package/lib/nextjs-vpc.d.ts +1 -1
- package/lib/nextjs-vpc.js +4 -4
- package/lib/root-constructs/nextjs-base-overrides.d.ts +4 -0
- package/lib/root-constructs/nextjs-base-overrides.js +1 -1
- package/lib/root-constructs/nextjs-base-props.d.ts +15 -7
- package/lib/root-constructs/nextjs-base-props.js +1 -1
- package/lib/root-constructs/nextjs-global-containers.d.ts +8 -8
- package/lib/root-constructs/nextjs-global-containers.js +26 -15
- package/lib/root-constructs/nextjs-global-functions.d.ts +8 -11
- package/lib/root-constructs/nextjs-global-functions.js +26 -25
- package/lib/root-constructs/nextjs-regional-containers.d.ts +8 -0
- package/lib/root-constructs/nextjs-regional-containers.js +26 -9
- package/lib/utils/get-architecture.d.ts +2 -0
- package/lib/utils/get-architecture.js +8 -0
- package/lib/utils/handle-deprecated-properties.d.ts +7 -0
- package/lib/utils/handle-deprecated-properties.js +14 -0
- package/package.json +17 -19
- package/assets/lambdas/revalidate/revalidate.lambda/index.js +0 -67
- package/lib/common.d.ts +0 -25
- package/lib/common.js +0 -30
- package/lib/generated-structs/OptionalNextjsInvalidationProps.d.ts +0 -11
- package/lib/generated-structs/OptionalNextjsInvalidationProps.js +0 -3
- package/lib/lambdas/assets-deployment/prune-s3.d.ts +0 -15
- package/lib/lambdas/assets-deployment/prune-s3.js +0 -42
- package/lib/lambdas/assets-deployment/s3.d.ts +0 -2
- package/lib/lambdas/assets-deployment/s3.js +0 -7
- package/lib/lambdas/assets-deployment/utils.js +0 -35
- package/lib/lambdas/revalidate/revalidate-function.d.ts +0 -13
- package/lib/lambdas/revalidate/revalidate-function.js +0 -22
- package/lib/lambdas/revalidate/revalidate.lambda.d.ts +0 -2
- package/lib/lambdas/revalidate/revalidate.lambda.js +0 -53
- package/lib/nextjs-build/add-cache-handler.d.ts +0 -1
- package/lib/nextjs-build/add-cache-handler.js +0 -23
- package/lib/nextjs-build/add-cache-handler.mjs +0 -18
- package/lib/nextjs-build/cache-handler.cjs +0 -21878
- package/lib/nextjs-build/cache-handler.d.ts +0 -6
- package/lib/nextjs-build/cache-handler.js +0 -26
- package/lib/nextjs-invalidation.d.ts +0 -19
- package/lib/nextjs-invalidation.js +0 -52
- package/lib/nextjs-revalidation.d.ts +0 -30
- package/lib/nextjs-revalidation.js +0 -65
- /package/lib/lambdas/{assets-deployment/utils.d.ts → utils.d.ts} +0 -0
package/API.md
CHANGED
|
@@ -89,7 +89,6 @@ Any object.
|
|
|
89
89
|
| <code><a href="#cdk-nextjs.NextjsAssetsDeployment.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
90
90
|
| <code><a href="#cdk-nextjs.NextjsAssetsDeployment.property.customResource">customResource</a></code> | <code>aws-cdk-lib.CustomResource</code> | *No description.* |
|
|
91
91
|
| <code><a href="#cdk-nextjs.NextjsAssetsDeployment.property.dockerImageFunction">dockerImageFunction</a></code> | <code>aws-cdk-lib.aws_lambda.DockerImageFunction</code> | *No description.* |
|
|
92
|
-
| <code><a href="#cdk-nextjs.NextjsAssetsDeployment.property.previewModeId">previewModeId</a></code> | <code>string</code> | Only used for `NextjsGlobalFunctions`. |
|
|
93
92
|
|
|
94
93
|
---
|
|
95
94
|
|
|
@@ -125,18 +124,6 @@ public readonly dockerImageFunction: DockerImageFunction;
|
|
|
125
124
|
|
|
126
125
|
---
|
|
127
126
|
|
|
128
|
-
##### `previewModeId`<sup>Required</sup> <a name="previewModeId" id="cdk-nextjs.NextjsAssetsDeployment.property.previewModeId"></a>
|
|
129
|
-
|
|
130
|
-
```typescript
|
|
131
|
-
public readonly previewModeId: string;
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
- *Type:* string
|
|
135
|
-
|
|
136
|
-
Only used for `NextjsGlobalFunctions`.
|
|
137
|
-
|
|
138
|
-
---
|
|
139
|
-
|
|
140
127
|
|
|
141
128
|
### NextjsBuild <a name="NextjsBuild" id="cdk-nextjs.NextjsBuild"></a>
|
|
142
129
|
|
|
@@ -225,8 +212,9 @@ Any object.
|
|
|
225
212
|
| **Name** | **Type** | **Description** |
|
|
226
213
|
| --- | --- | --- |
|
|
227
214
|
| <code><a href="#cdk-nextjs.NextjsBuild.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
215
|
+
| <code><a href="#cdk-nextjs.NextjsBuild.property.builderImageAlias">builderImageAlias</a></code> | <code>string</code> | Image alias of builder image Next.js app which is built for other images to be built `FROM`. This image isn't built with CDK Assets construct b/c it doesn't need to be uploaded to ECR. We still need to include slice of `node.addr` in tag in case multiple cdk-nextjs constructs are used. |
|
|
216
|
+
| <code><a href="#cdk-nextjs.NextjsBuild.property.buildId">buildId</a></code> | <code>string</code> | Unique id for Next.js build. Used to partition EFS FileSystem. |
|
|
228
217
|
| <code><a href="#cdk-nextjs.NextjsBuild.property.buildImageDigest">buildImageDigest</a></code> | <code>string</code> | Hash of builder image which will change whenever the image changes. |
|
|
229
|
-
| <code><a href="#cdk-nextjs.NextjsBuild.property.containerMountPathForEfs">containerMountPathForEfs</a></code> | <code>string</code> | Mount path in container for EFS. Next.js image optimization, data, and full route cache will be symlinked to this location. |
|
|
230
218
|
| <code><a href="#cdk-nextjs.NextjsBuild.property.imageForNextjsAssetsDeployment">imageForNextjsAssetsDeployment</a></code> | <code>aws-cdk-lib.aws_lambda.DockerImageCode</code> | Docker image built for `NextjsAssetsDeployment`. |
|
|
231
219
|
| <code><a href="#cdk-nextjs.NextjsBuild.property.publicDirEntries">publicDirEntries</a></code> | <code><a href="#cdk-nextjs.PublicDirEntry">PublicDirEntry</a>[]</code> | Absolute path to public. |
|
|
232
220
|
| <code><a href="#cdk-nextjs.NextjsBuild.property.relativePathToEntrypoint">relativePathToEntrypoint</a></code> | <code>string</code> | The entrypoint JavaScript file used as an argument for Node.js to run the Next.js standalone server relative to the standalone directory. |
|
|
@@ -247,37 +235,43 @@ The tree node.
|
|
|
247
235
|
|
|
248
236
|
---
|
|
249
237
|
|
|
250
|
-
##### `
|
|
238
|
+
##### `builderImageAlias`<sup>Required</sup> <a name="builderImageAlias" id="cdk-nextjs.NextjsBuild.property.builderImageAlias"></a>
|
|
251
239
|
|
|
252
240
|
```typescript
|
|
253
|
-
public readonly
|
|
241
|
+
public readonly builderImageAlias: string;
|
|
254
242
|
```
|
|
255
243
|
|
|
256
244
|
- *Type:* string
|
|
257
245
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
Useful
|
|
261
|
-
for passing to properties of custom resources that depend upon the builder
|
|
262
|
-
image to re-run when build image changes.
|
|
246
|
+
Image alias of builder image Next.js app which is built for other images to be built `FROM`. This image isn't built with CDK Assets construct b/c it doesn't need to be uploaded to ECR. We still need to include slice of `node.addr` in tag in case multiple cdk-nextjs constructs are used.
|
|
263
247
|
|
|
264
248
|
---
|
|
265
249
|
|
|
266
|
-
##### `
|
|
250
|
+
##### `buildId`<sup>Required</sup> <a name="buildId" id="cdk-nextjs.NextjsBuild.property.buildId"></a>
|
|
267
251
|
|
|
268
252
|
```typescript
|
|
269
|
-
public readonly
|
|
253
|
+
public readonly buildId: string;
|
|
270
254
|
```
|
|
271
255
|
|
|
272
256
|
- *Type:* string
|
|
273
257
|
|
|
274
|
-
|
|
258
|
+
Unique id for Next.js build. Used to partition EFS FileSystem.
|
|
275
259
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
##### `buildImageDigest`<sup>Required</sup> <a name="buildImageDigest" id="cdk-nextjs.NextjsBuild.property.buildImageDigest"></a>
|
|
263
|
+
|
|
264
|
+
```typescript
|
|
265
|
+
public readonly buildImageDigest: string;
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
- *Type:* string
|
|
269
|
+
|
|
270
|
+
Hash of builder image which will change whenever the image changes.
|
|
279
271
|
|
|
280
|
-
|
|
272
|
+
Useful
|
|
273
|
+
for passing to properties of custom resources that depend upon the builder
|
|
274
|
+
image to re-run when build image changes.
|
|
281
275
|
|
|
282
276
|
---
|
|
283
277
|
|
|
@@ -951,7 +945,7 @@ Any object.
|
|
|
951
945
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.nextjsContainers">nextjsContainers</a></code> | <code><a href="#cdk-nextjs.NextjsContainers">NextjsContainers</a></code> | *No description.* |
|
|
952
946
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.nextjsDistribution">nextjsDistribution</a></code> | <code><a href="#cdk-nextjs.NextjsDistribution">NextjsDistribution</a></code> | *No description.* |
|
|
953
947
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.nextjsFileSystem">nextjsFileSystem</a></code> | <code><a href="#cdk-nextjs.NextjsFileSystem">NextjsFileSystem</a></code> | *No description.* |
|
|
954
|
-
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.
|
|
948
|
+
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.nextjsPostDeploy">nextjsPostDeploy</a></code> | <code><a href="#cdk-nextjs.NextjsPostDeploy">NextjsPostDeploy</a></code> | *No description.* |
|
|
955
949
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.nextjsStaticAssets">nextjsStaticAssets</a></code> | <code><a href="#cdk-nextjs.NextjsStaticAssets">NextjsStaticAssets</a></code> | *No description.* |
|
|
956
950
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.nextjsVpc">nextjsVpc</a></code> | <code><a href="#cdk-nextjs.NextjsVpc">NextjsVpc</a></code> | *No description.* |
|
|
957
951
|
|
|
@@ -1019,13 +1013,13 @@ public readonly nextjsFileSystem: NextjsFileSystem;
|
|
|
1019
1013
|
|
|
1020
1014
|
---
|
|
1021
1015
|
|
|
1022
|
-
##### `
|
|
1016
|
+
##### `nextjsPostDeploy`<sup>Required</sup> <a name="nextjsPostDeploy" id="cdk-nextjs.NextjsGlobalContainers.property.nextjsPostDeploy"></a>
|
|
1023
1017
|
|
|
1024
1018
|
```typescript
|
|
1025
|
-
public readonly
|
|
1019
|
+
public readonly nextjsPostDeploy: NextjsPostDeploy;
|
|
1026
1020
|
```
|
|
1027
1021
|
|
|
1028
|
-
- *Type:* <a href="#cdk-nextjs.
|
|
1022
|
+
- *Type:* <a href="#cdk-nextjs.NextjsPostDeploy">NextjsPostDeploy</a>
|
|
1029
1023
|
|
|
1030
1024
|
---
|
|
1031
1025
|
|
|
@@ -1140,8 +1134,7 @@ Any object.
|
|
|
1140
1134
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsDistribution">nextjsDistribution</a></code> | <code><a href="#cdk-nextjs.NextjsDistribution">NextjsDistribution</a></code> | *No description.* |
|
|
1141
1135
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsFileSystem">nextjsFileSystem</a></code> | <code><a href="#cdk-nextjs.NextjsFileSystem">NextjsFileSystem</a></code> | *No description.* |
|
|
1142
1136
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsFunctions">nextjsFunctions</a></code> | <code><a href="#cdk-nextjs.NextjsFunctions">NextjsFunctions</a></code> | *No description.* |
|
|
1143
|
-
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.
|
|
1144
|
-
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsRevalidation">nextjsRevalidation</a></code> | <code><a href="#cdk-nextjs.NextjsRevalidation">NextjsRevalidation</a></code> | *No description.* |
|
|
1137
|
+
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsPostDeploy">nextjsPostDeploy</a></code> | <code><a href="#cdk-nextjs.NextjsPostDeploy">NextjsPostDeploy</a></code> | *No description.* |
|
|
1145
1138
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsStaticAssets">nextjsStaticAssets</a></code> | <code><a href="#cdk-nextjs.NextjsStaticAssets">NextjsStaticAssets</a></code> | *No description.* |
|
|
1146
1139
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsVpc">nextjsVpc</a></code> | <code><a href="#cdk-nextjs.NextjsVpc">NextjsVpc</a></code> | *No description.* |
|
|
1147
1140
|
|
|
@@ -1209,23 +1202,13 @@ public readonly nextjsFunctions: NextjsFunctions;
|
|
|
1209
1202
|
|
|
1210
1203
|
---
|
|
1211
1204
|
|
|
1212
|
-
##### `
|
|
1213
|
-
|
|
1214
|
-
```typescript
|
|
1215
|
-
public readonly nextjsInvalidation: NextjsInvalidation;
|
|
1216
|
-
```
|
|
1217
|
-
|
|
1218
|
-
- *Type:* <a href="#cdk-nextjs.NextjsInvalidation">NextjsInvalidation</a>
|
|
1219
|
-
|
|
1220
|
-
---
|
|
1221
|
-
|
|
1222
|
-
##### `nextjsRevalidation`<sup>Required</sup> <a name="nextjsRevalidation" id="cdk-nextjs.NextjsGlobalFunctions.property.nextjsRevalidation"></a>
|
|
1205
|
+
##### `nextjsPostDeploy`<sup>Required</sup> <a name="nextjsPostDeploy" id="cdk-nextjs.NextjsGlobalFunctions.property.nextjsPostDeploy"></a>
|
|
1223
1206
|
|
|
1224
1207
|
```typescript
|
|
1225
|
-
public readonly
|
|
1208
|
+
public readonly nextjsPostDeploy: NextjsPostDeploy;
|
|
1226
1209
|
```
|
|
1227
1210
|
|
|
1228
|
-
- *Type:* <a href="#cdk-nextjs.
|
|
1211
|
+
- *Type:* <a href="#cdk-nextjs.NextjsPostDeploy">NextjsPostDeploy</a>
|
|
1229
1212
|
|
|
1230
1213
|
---
|
|
1231
1214
|
|
|
@@ -1250,39 +1233,46 @@ public readonly nextjsVpc: NextjsVpc;
|
|
|
1250
1233
|
---
|
|
1251
1234
|
|
|
1252
1235
|
|
|
1253
|
-
###
|
|
1236
|
+
### NextjsPostDeploy <a name="NextjsPostDeploy" id="cdk-nextjs.NextjsPostDeploy"></a>
|
|
1237
|
+
|
|
1238
|
+
Performs post deployment tasks in custom resource.
|
|
1254
1239
|
|
|
1255
|
-
|
|
1240
|
+
1. CloudFront Invalidation (defaults to /*)
|
|
1241
|
+
2. Prunes FileSystem by removing directories that don't match this deployments BUILD_ID
|
|
1242
|
+
3. Prune S3 by removing objects that don't have next-build-id metadata of
|
|
1243
|
+
current build id AND are older than `msTtl`
|
|
1244
|
+
|
|
1245
|
+
#### Initializers <a name="Initializers" id="cdk-nextjs.NextjsPostDeploy.Initializer"></a>
|
|
1256
1246
|
|
|
1257
1247
|
```typescript
|
|
1258
|
-
import {
|
|
1248
|
+
import { NextjsPostDeploy } from 'cdk-nextjs'
|
|
1259
1249
|
|
|
1260
|
-
new
|
|
1250
|
+
new NextjsPostDeploy(scope: Construct, id: string, props: NextjsPostDeployProps)
|
|
1261
1251
|
```
|
|
1262
1252
|
|
|
1263
1253
|
| **Name** | **Type** | **Description** |
|
|
1264
1254
|
| --- | --- | --- |
|
|
1265
|
-
| <code><a href="#cdk-nextjs.
|
|
1266
|
-
| <code><a href="#cdk-nextjs.
|
|
1267
|
-
| <code><a href="#cdk-nextjs.
|
|
1255
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeploy.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
1256
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeploy.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
1257
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeploy.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nextjs.NextjsPostDeployProps">NextjsPostDeployProps</a></code> | *No description.* |
|
|
1268
1258
|
|
|
1269
1259
|
---
|
|
1270
1260
|
|
|
1271
|
-
##### `scope`<sup>Required</sup> <a name="scope" id="cdk-nextjs.
|
|
1261
|
+
##### `scope`<sup>Required</sup> <a name="scope" id="cdk-nextjs.NextjsPostDeploy.Initializer.parameter.scope"></a>
|
|
1272
1262
|
|
|
1273
1263
|
- *Type:* constructs.Construct
|
|
1274
1264
|
|
|
1275
1265
|
---
|
|
1276
1266
|
|
|
1277
|
-
##### `id`<sup>Required</sup> <a name="id" id="cdk-nextjs.
|
|
1267
|
+
##### `id`<sup>Required</sup> <a name="id" id="cdk-nextjs.NextjsPostDeploy.Initializer.parameter.id"></a>
|
|
1278
1268
|
|
|
1279
1269
|
- *Type:* string
|
|
1280
1270
|
|
|
1281
1271
|
---
|
|
1282
1272
|
|
|
1283
|
-
##### `props`<sup>Required</sup> <a name="props" id="cdk-nextjs.
|
|
1273
|
+
##### `props`<sup>Required</sup> <a name="props" id="cdk-nextjs.NextjsPostDeploy.Initializer.parameter.props"></a>
|
|
1284
1274
|
|
|
1285
|
-
- *Type:* <a href="#cdk-nextjs.
|
|
1275
|
+
- *Type:* <a href="#cdk-nextjs.NextjsPostDeployProps">NextjsPostDeployProps</a>
|
|
1286
1276
|
|
|
1287
1277
|
---
|
|
1288
1278
|
|
|
@@ -1290,11 +1280,11 @@ new NextjsInvalidation(scope: Construct, id: string, props: NextjsInvalidationPr
|
|
|
1290
1280
|
|
|
1291
1281
|
| **Name** | **Description** |
|
|
1292
1282
|
| --- | --- |
|
|
1293
|
-
| <code><a href="#cdk-nextjs.
|
|
1283
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeploy.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
1294
1284
|
|
|
1295
1285
|
---
|
|
1296
1286
|
|
|
1297
|
-
##### `toString` <a name="toString" id="cdk-nextjs.
|
|
1287
|
+
##### `toString` <a name="toString" id="cdk-nextjs.NextjsPostDeploy.toString"></a>
|
|
1298
1288
|
|
|
1299
1289
|
```typescript
|
|
1300
1290
|
public toString(): string
|
|
@@ -1306,21 +1296,21 @@ Returns a string representation of this construct.
|
|
|
1306
1296
|
|
|
1307
1297
|
| **Name** | **Description** |
|
|
1308
1298
|
| --- | --- |
|
|
1309
|
-
| <code><a href="#cdk-nextjs.
|
|
1299
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeploy.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
1310
1300
|
|
|
1311
1301
|
---
|
|
1312
1302
|
|
|
1313
|
-
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-nextjs.
|
|
1303
|
+
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-nextjs.NextjsPostDeploy.isConstruct"></a>
|
|
1314
1304
|
|
|
1315
1305
|
```typescript
|
|
1316
|
-
import {
|
|
1306
|
+
import { NextjsPostDeploy } from 'cdk-nextjs'
|
|
1317
1307
|
|
|
1318
|
-
|
|
1308
|
+
NextjsPostDeploy.isConstruct(x: any)
|
|
1319
1309
|
```
|
|
1320
1310
|
|
|
1321
1311
|
Checks if `x` is a construct.
|
|
1322
1312
|
|
|
1323
|
-
###### `x`<sup>Required</sup> <a name="x" id="cdk-nextjs.
|
|
1313
|
+
###### `x`<sup>Required</sup> <a name="x" id="cdk-nextjs.NextjsPostDeploy.isConstruct.parameter.x"></a>
|
|
1324
1314
|
|
|
1325
1315
|
- *Type:* any
|
|
1326
1316
|
|
|
@@ -1332,11 +1322,13 @@ Any object.
|
|
|
1332
1322
|
|
|
1333
1323
|
| **Name** | **Type** | **Description** |
|
|
1334
1324
|
| --- | --- | --- |
|
|
1335
|
-
| <code><a href="#cdk-nextjs.
|
|
1325
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeploy.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
1326
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeploy.property.customResource">customResource</a></code> | <code>aws-cdk-lib.CustomResource</code> | *No description.* |
|
|
1327
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeploy.property.lambdaFunction">lambdaFunction</a></code> | <code>aws-cdk-lib.aws_lambda.Function</code> | *No description.* |
|
|
1336
1328
|
|
|
1337
1329
|
---
|
|
1338
1330
|
|
|
1339
|
-
##### `node`<sup>Required</sup> <a name="node" id="cdk-nextjs.
|
|
1331
|
+
##### `node`<sup>Required</sup> <a name="node" id="cdk-nextjs.NextjsPostDeploy.property.node"></a>
|
|
1340
1332
|
|
|
1341
1333
|
```typescript
|
|
1342
1334
|
public readonly node: Node;
|
|
@@ -1348,6 +1340,26 @@ The tree node.
|
|
|
1348
1340
|
|
|
1349
1341
|
---
|
|
1350
1342
|
|
|
1343
|
+
##### `customResource`<sup>Required</sup> <a name="customResource" id="cdk-nextjs.NextjsPostDeploy.property.customResource"></a>
|
|
1344
|
+
|
|
1345
|
+
```typescript
|
|
1346
|
+
public readonly customResource: CustomResource;
|
|
1347
|
+
```
|
|
1348
|
+
|
|
1349
|
+
- *Type:* aws-cdk-lib.CustomResource
|
|
1350
|
+
|
|
1351
|
+
---
|
|
1352
|
+
|
|
1353
|
+
##### `lambdaFunction`<sup>Required</sup> <a name="lambdaFunction" id="cdk-nextjs.NextjsPostDeploy.property.lambdaFunction"></a>
|
|
1354
|
+
|
|
1355
|
+
```typescript
|
|
1356
|
+
public readonly lambdaFunction: Function;
|
|
1357
|
+
```
|
|
1358
|
+
|
|
1359
|
+
- *Type:* aws-cdk-lib.aws_lambda.Function
|
|
1360
|
+
|
|
1361
|
+
---
|
|
1362
|
+
|
|
1351
1363
|
|
|
1352
1364
|
### NextjsRegionalContainers <a name="NextjsRegionalContainers" id="cdk-nextjs.NextjsRegionalContainers"></a>
|
|
1353
1365
|
|
|
@@ -1438,6 +1450,7 @@ Any object.
|
|
|
1438
1450
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainers.property.nextjsBuild">nextjsBuild</a></code> | <code><a href="#cdk-nextjs.NextjsBuild">NextjsBuild</a></code> | *No description.* |
|
|
1439
1451
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainers.property.nextjsContainers">nextjsContainers</a></code> | <code><a href="#cdk-nextjs.NextjsContainers">NextjsContainers</a></code> | *No description.* |
|
|
1440
1452
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainers.property.nextjsFileSystem">nextjsFileSystem</a></code> | <code><a href="#cdk-nextjs.NextjsFileSystem">NextjsFileSystem</a></code> | *No description.* |
|
|
1453
|
+
| <code><a href="#cdk-nextjs.NextjsRegionalContainers.property.nextjsPostDeploy">nextjsPostDeploy</a></code> | <code><a href="#cdk-nextjs.NextjsPostDeploy">NextjsPostDeploy</a></code> | *No description.* |
|
|
1441
1454
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainers.property.nextjsVpc">nextjsVpc</a></code> | <code><a href="#cdk-nextjs.NextjsVpc">NextjsVpc</a></code> | *No description.* |
|
|
1442
1455
|
|
|
1443
1456
|
---
|
|
@@ -1494,136 +1507,23 @@ public readonly nextjsFileSystem: NextjsFileSystem;
|
|
|
1494
1507
|
|
|
1495
1508
|
---
|
|
1496
1509
|
|
|
1497
|
-
##### `
|
|
1498
|
-
|
|
1499
|
-
```typescript
|
|
1500
|
-
public readonly nextjsVpc: NextjsVpc;
|
|
1501
|
-
```
|
|
1502
|
-
|
|
1503
|
-
- *Type:* <a href="#cdk-nextjs.NextjsVpc">NextjsVpc</a>
|
|
1504
|
-
|
|
1505
|
-
---
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
### NextjsRevalidation <a name="NextjsRevalidation" id="cdk-nextjs.NextjsRevalidation"></a>
|
|
1509
|
-
|
|
1510
|
-
[On-Demand Revalidation](https://nextjs.org/docs/app/building-your-application/caching#on-demand-revalidation) (i.e. `revalidateTag`, `revlidatePath`) doesn't work by default in Lambda environment because it tries to run every request completes when Lambda spins down. Therefore, we use a SQS Queue and Lambda function to run revalidation async.
|
|
1511
|
-
|
|
1512
|
-
#### Initializers <a name="Initializers" id="cdk-nextjs.NextjsRevalidation.Initializer"></a>
|
|
1513
|
-
|
|
1514
|
-
```typescript
|
|
1515
|
-
import { NextjsRevalidation } from 'cdk-nextjs'
|
|
1516
|
-
|
|
1517
|
-
new NextjsRevalidation(scope: Construct, id: string, props: NextjsRevalidationProps)
|
|
1518
|
-
```
|
|
1519
|
-
|
|
1520
|
-
| **Name** | **Type** | **Description** |
|
|
1521
|
-
| --- | --- | --- |
|
|
1522
|
-
| <code><a href="#cdk-nextjs.NextjsRevalidation.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
|
|
1523
|
-
| <code><a href="#cdk-nextjs.NextjsRevalidation.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
|
|
1524
|
-
| <code><a href="#cdk-nextjs.NextjsRevalidation.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nextjs.NextjsRevalidationProps">NextjsRevalidationProps</a></code> | *No description.* |
|
|
1525
|
-
|
|
1526
|
-
---
|
|
1527
|
-
|
|
1528
|
-
##### `scope`<sup>Required</sup> <a name="scope" id="cdk-nextjs.NextjsRevalidation.Initializer.parameter.scope"></a>
|
|
1529
|
-
|
|
1530
|
-
- *Type:* constructs.Construct
|
|
1531
|
-
|
|
1532
|
-
---
|
|
1533
|
-
|
|
1534
|
-
##### `id`<sup>Required</sup> <a name="id" id="cdk-nextjs.NextjsRevalidation.Initializer.parameter.id"></a>
|
|
1535
|
-
|
|
1536
|
-
- *Type:* string
|
|
1537
|
-
|
|
1538
|
-
---
|
|
1539
|
-
|
|
1540
|
-
##### `props`<sup>Required</sup> <a name="props" id="cdk-nextjs.NextjsRevalidation.Initializer.parameter.props"></a>
|
|
1541
|
-
|
|
1542
|
-
- *Type:* <a href="#cdk-nextjs.NextjsRevalidationProps">NextjsRevalidationProps</a>
|
|
1543
|
-
|
|
1544
|
-
---
|
|
1545
|
-
|
|
1546
|
-
#### Methods <a name="Methods" id="Methods"></a>
|
|
1547
|
-
|
|
1548
|
-
| **Name** | **Description** |
|
|
1549
|
-
| --- | --- |
|
|
1550
|
-
| <code><a href="#cdk-nextjs.NextjsRevalidation.toString">toString</a></code> | Returns a string representation of this construct. |
|
|
1551
|
-
|
|
1552
|
-
---
|
|
1553
|
-
|
|
1554
|
-
##### `toString` <a name="toString" id="cdk-nextjs.NextjsRevalidation.toString"></a>
|
|
1555
|
-
|
|
1556
|
-
```typescript
|
|
1557
|
-
public toString(): string
|
|
1558
|
-
```
|
|
1559
|
-
|
|
1560
|
-
Returns a string representation of this construct.
|
|
1561
|
-
|
|
1562
|
-
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
|
|
1563
|
-
|
|
1564
|
-
| **Name** | **Description** |
|
|
1565
|
-
| --- | --- |
|
|
1566
|
-
| <code><a href="#cdk-nextjs.NextjsRevalidation.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
|
|
1567
|
-
|
|
1568
|
-
---
|
|
1569
|
-
|
|
1570
|
-
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-nextjs.NextjsRevalidation.isConstruct"></a>
|
|
1571
|
-
|
|
1572
|
-
```typescript
|
|
1573
|
-
import { NextjsRevalidation } from 'cdk-nextjs'
|
|
1574
|
-
|
|
1575
|
-
NextjsRevalidation.isConstruct(x: any)
|
|
1576
|
-
```
|
|
1577
|
-
|
|
1578
|
-
Checks if `x` is a construct.
|
|
1579
|
-
|
|
1580
|
-
###### `x`<sup>Required</sup> <a name="x" id="cdk-nextjs.NextjsRevalidation.isConstruct.parameter.x"></a>
|
|
1581
|
-
|
|
1582
|
-
- *Type:* any
|
|
1583
|
-
|
|
1584
|
-
Any object.
|
|
1585
|
-
|
|
1586
|
-
---
|
|
1587
|
-
|
|
1588
|
-
#### Properties <a name="Properties" id="Properties"></a>
|
|
1589
|
-
|
|
1590
|
-
| **Name** | **Type** | **Description** |
|
|
1591
|
-
| --- | --- | --- |
|
|
1592
|
-
| <code><a href="#cdk-nextjs.NextjsRevalidation.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
|
|
1593
|
-
| <code><a href="#cdk-nextjs.NextjsRevalidation.property.fn">fn</a></code> | <code>aws-cdk-lib.aws_lambda.Function</code> | *No description.* |
|
|
1594
|
-
| <code><a href="#cdk-nextjs.NextjsRevalidation.property.queue">queue</a></code> | <code>aws-cdk-lib.aws_sqs.Queue</code> | *No description.* |
|
|
1595
|
-
|
|
1596
|
-
---
|
|
1597
|
-
|
|
1598
|
-
##### `node`<sup>Required</sup> <a name="node" id="cdk-nextjs.NextjsRevalidation.property.node"></a>
|
|
1599
|
-
|
|
1600
|
-
```typescript
|
|
1601
|
-
public readonly node: Node;
|
|
1602
|
-
```
|
|
1603
|
-
|
|
1604
|
-
- *Type:* constructs.Node
|
|
1605
|
-
|
|
1606
|
-
The tree node.
|
|
1607
|
-
|
|
1608
|
-
---
|
|
1609
|
-
|
|
1610
|
-
##### `fn`<sup>Required</sup> <a name="fn" id="cdk-nextjs.NextjsRevalidation.property.fn"></a>
|
|
1510
|
+
##### `nextjsPostDeploy`<sup>Required</sup> <a name="nextjsPostDeploy" id="cdk-nextjs.NextjsRegionalContainers.property.nextjsPostDeploy"></a>
|
|
1611
1511
|
|
|
1612
1512
|
```typescript
|
|
1613
|
-
public readonly
|
|
1513
|
+
public readonly nextjsPostDeploy: NextjsPostDeploy;
|
|
1614
1514
|
```
|
|
1615
1515
|
|
|
1616
|
-
- *Type:*
|
|
1516
|
+
- *Type:* <a href="#cdk-nextjs.NextjsPostDeploy">NextjsPostDeploy</a>
|
|
1617
1517
|
|
|
1618
1518
|
---
|
|
1619
1519
|
|
|
1620
|
-
##### `
|
|
1520
|
+
##### `nextjsVpc`<sup>Required</sup> <a name="nextjsVpc" id="cdk-nextjs.NextjsRegionalContainers.property.nextjsVpc"></a>
|
|
1621
1521
|
|
|
1622
1522
|
```typescript
|
|
1623
|
-
public readonly
|
|
1523
|
+
public readonly nextjsVpc: NextjsVpc;
|
|
1624
1524
|
```
|
|
1625
1525
|
|
|
1626
|
-
- *Type:*
|
|
1526
|
+
- *Type:* <a href="#cdk-nextjs.NextjsVpc">NextjsVpc</a>
|
|
1627
1527
|
|
|
1628
1528
|
---
|
|
1629
1529
|
|
|
@@ -1920,6 +1820,7 @@ const baseNextjsConstructOverrides: BaseNextjsConstructOverrides = { ... }
|
|
|
1920
1820
|
| <code><a href="#cdk-nextjs.BaseNextjsConstructOverrides.property.nextjsAssetsDeploymentProps">nextjsAssetsDeploymentProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps">OptionalNextjsAssetsDeploymentProps</a></code> | *No description.* |
|
|
1921
1821
|
| <code><a href="#cdk-nextjs.BaseNextjsConstructOverrides.property.nextjsBuildProps">nextjsBuildProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsBuildProps">OptionalNextjsBuildProps</a></code> | *No description.* |
|
|
1922
1822
|
| <code><a href="#cdk-nextjs.BaseNextjsConstructOverrides.property.nextjsFileSystemProps">nextjsFileSystemProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsFileSystemProps">OptionalNextjsFileSystemProps</a></code> | *No description.* |
|
|
1823
|
+
| <code><a href="#cdk-nextjs.BaseNextjsConstructOverrides.property.nextjsPostDeployProps">nextjsPostDeployProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsPostDeployProps">OptionalNextjsPostDeployProps</a></code> | *No description.* |
|
|
1923
1824
|
| <code><a href="#cdk-nextjs.BaseNextjsConstructOverrides.property.nextjsVpcProps">nextjsVpcProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsVpcProps">OptionalNextjsVpcProps</a></code> | *No description.* |
|
|
1924
1825
|
|
|
1925
1826
|
---
|
|
@@ -1954,6 +1855,16 @@ public readonly nextjsFileSystemProps: OptionalNextjsFileSystemProps;
|
|
|
1954
1855
|
|
|
1955
1856
|
---
|
|
1956
1857
|
|
|
1858
|
+
##### `nextjsPostDeployProps`<sup>Optional</sup> <a name="nextjsPostDeployProps" id="cdk-nextjs.BaseNextjsConstructOverrides.property.nextjsPostDeployProps"></a>
|
|
1859
|
+
|
|
1860
|
+
```typescript
|
|
1861
|
+
public readonly nextjsPostDeployProps: OptionalNextjsPostDeployProps;
|
|
1862
|
+
```
|
|
1863
|
+
|
|
1864
|
+
- *Type:* <a href="#cdk-nextjs.OptionalNextjsPostDeployProps">OptionalNextjsPostDeployProps</a>
|
|
1865
|
+
|
|
1866
|
+
---
|
|
1867
|
+
|
|
1957
1868
|
##### `nextjsVpcProps`<sup>Optional</sup> <a name="nextjsVpcProps" id="cdk-nextjs.BaseNextjsConstructOverrides.property.nextjsVpcProps"></a>
|
|
1958
1869
|
|
|
1959
1870
|
```typescript
|
|
@@ -1983,6 +1894,7 @@ const baseNextjsOverrides: BaseNextjsOverrides = { ... }
|
|
|
1983
1894
|
| <code><a href="#cdk-nextjs.BaseNextjsOverrides.property.nextjsAssetsDeployment">nextjsAssetsDeployment</a></code> | <code><a href="#cdk-nextjs.NextjsAssetDeploymentOverrides">NextjsAssetDeploymentOverrides</a></code> | *No description.* |
|
|
1984
1895
|
| <code><a href="#cdk-nextjs.BaseNextjsOverrides.property.nextjsBuild">nextjsBuild</a></code> | <code><a href="#cdk-nextjs.NextjsBuildOverrides">NextjsBuildOverrides</a></code> | *No description.* |
|
|
1985
1896
|
| <code><a href="#cdk-nextjs.BaseNextjsOverrides.property.nextjsFileSystem">nextjsFileSystem</a></code> | <code><a href="#cdk-nextjs.NextjsFileSystemOverrides">NextjsFileSystemOverrides</a></code> | *No description.* |
|
|
1897
|
+
| <code><a href="#cdk-nextjs.BaseNextjsOverrides.property.nextjsPostDeploy">nextjsPostDeploy</a></code> | <code><a href="#cdk-nextjs.NextjsPostDeployOverrides">NextjsPostDeployOverrides</a></code> | *No description.* |
|
|
1986
1898
|
| <code><a href="#cdk-nextjs.BaseNextjsOverrides.property.nextjsVpc">nextjsVpc</a></code> | <code><a href="#cdk-nextjs.NextjsVpcOverrides">NextjsVpcOverrides</a></code> | *No description.* |
|
|
1987
1899
|
|
|
1988
1900
|
---
|
|
@@ -2017,6 +1929,16 @@ public readonly nextjsFileSystem: NextjsFileSystemOverrides;
|
|
|
2017
1929
|
|
|
2018
1930
|
---
|
|
2019
1931
|
|
|
1932
|
+
##### `nextjsPostDeploy`<sup>Optional</sup> <a name="nextjsPostDeploy" id="cdk-nextjs.BaseNextjsOverrides.property.nextjsPostDeploy"></a>
|
|
1933
|
+
|
|
1934
|
+
```typescript
|
|
1935
|
+
public readonly nextjsPostDeploy: NextjsPostDeployOverrides;
|
|
1936
|
+
```
|
|
1937
|
+
|
|
1938
|
+
- *Type:* <a href="#cdk-nextjs.NextjsPostDeployOverrides">NextjsPostDeployOverrides</a>
|
|
1939
|
+
|
|
1940
|
+
---
|
|
1941
|
+
|
|
2020
1942
|
##### `nextjsVpc`<sup>Optional</sup> <a name="nextjsVpc" id="cdk-nextjs.BaseNextjsOverrides.property.nextjsVpc"></a>
|
|
2021
1943
|
|
|
2022
1944
|
```typescript
|
|
@@ -2043,10 +1965,9 @@ const builderImageProps: BuilderImageProps = { ... }
|
|
|
2043
1965
|
| --- | --- | --- |
|
|
2044
1966
|
| <code><a href="#cdk-nextjs.BuilderImageProps.property.buildArgs">buildArgs</a></code> | <code>{[ key: string ]: string}</code> | Build Args to be passed to `docker build` command. |
|
|
2045
1967
|
| <code><a href="#cdk-nextjs.BuilderImageProps.property.command">command</a></code> | <code>string</code> | `docker build ...` command to run in {@link NextBaseProps.buildContext }. Default interpolates other props. If you override, other props will have no effect on command. |
|
|
2046
|
-
| <code><a href="#cdk-nextjs.BuilderImageProps.property.customDockerfilePath">customDockerfilePath</a></code> | <code>string</code> | Path to your custom builder.Dockerfile which will be copied into {@link NextBaseProps.buildContext }. It is recommended to override this prop to optimize build caching for your setup. |
|
|
2047
1968
|
| <code><a href="#cdk-nextjs.BuilderImageProps.property.envVarNames">envVarNames</a></code> | <code>string[]</code> | Environment variables names to pass from host to container during build process. |
|
|
2048
1969
|
| <code><a href="#cdk-nextjs.BuilderImageProps.property.exclude">exclude</a></code> | <code>string[]</code> | Lines in .dockerignore file which will be created in your {@link NextBaseProps.buildContext }. |
|
|
2049
|
-
| <code><a href="#cdk-nextjs.BuilderImageProps.property.file">file</a></code> | <code>string</code> | Name of Dockerfile. |
|
|
1970
|
+
| <code><a href="#cdk-nextjs.BuilderImageProps.property.file">file</a></code> | <code>string</code> | Name of Dockerfile in builder build context. |
|
|
2050
1971
|
| <code><a href="#cdk-nextjs.BuilderImageProps.property.platform">platform</a></code> | <code>aws-cdk-lib.aws_ecr_assets.Platform</code> | *No description.* |
|
|
2051
1972
|
| <code><a href="#cdk-nextjs.BuilderImageProps.property.skipBuild">skipBuild</a></code> | <code>boolean</code> | Skip building the builder image. |
|
|
2052
1973
|
|
|
@@ -2076,18 +1997,6 @@ public readonly command: string;
|
|
|
2076
1997
|
|
|
2077
1998
|
---
|
|
2078
1999
|
|
|
2079
|
-
##### `customDockerfilePath`<sup>Optional</sup> <a name="customDockerfilePath" id="cdk-nextjs.BuilderImageProps.property.customDockerfilePath"></a>
|
|
2080
|
-
|
|
2081
|
-
```typescript
|
|
2082
|
-
public readonly customDockerfilePath: string;
|
|
2083
|
-
```
|
|
2084
|
-
|
|
2085
|
-
- *Type:* string
|
|
2086
|
-
|
|
2087
|
-
Path to your custom builder.Dockerfile which will be copied into {@link NextBaseProps.buildContext }. It is recommended to override this prop to optimize build caching for your setup.
|
|
2088
|
-
|
|
2089
|
-
---
|
|
2090
|
-
|
|
2091
2000
|
##### `envVarNames`<sup>Optional</sup> <a name="envVarNames" id="cdk-nextjs.BuilderImageProps.property.envVarNames"></a>
|
|
2092
2001
|
|
|
2093
2002
|
```typescript
|
|
@@ -2101,7 +2010,7 @@ Environment variables names to pass from host to container during build process.
|
|
|
2101
2010
|
Note, a shell script, cdk-nextjs-load-env-vars.sh is created within the
|
|
2102
2011
|
{@link NextBaseProps.buildContext } directory, which will contain all the
|
|
2103
2012
|
environment variables defined in this prop. If you've created your own
|
|
2104
|
-
custom Dockerfile (passed in via {@link BuilderImageProps.customDockerfilePath})
|
|
2013
|
+
custom Dockerfile (passed in via {@link BuilderImageProps.customDockerfilePath })
|
|
2105
2014
|
then you need to make sure you're copying it into the image.
|
|
2106
2015
|
|
|
2107
2016
|
---
|
|
@@ -2135,7 +2044,10 @@ public readonly file: string;
|
|
|
2135
2044
|
- *Type:* string
|
|
2136
2045
|
- *Default:* "builder.Dockerfile"
|
|
2137
2046
|
|
|
2138
|
-
Name of Dockerfile.
|
|
2047
|
+
Name of Dockerfile in builder build context.
|
|
2048
|
+
|
|
2049
|
+
If specified, you are responsible
|
|
2050
|
+
for ensuring it exists in build context before construct is instantiated.
|
|
2139
2051
|
|
|
2140
2052
|
---
|
|
2141
2053
|
|
|
@@ -2176,10 +2088,23 @@ const nextjsAssetDeploymentOverrides: NextjsAssetDeploymentOverrides = { ... }
|
|
|
2176
2088
|
|
|
2177
2089
|
| **Name** | **Type** | **Description** |
|
|
2178
2090
|
| --- | --- | --- |
|
|
2091
|
+
| <code><a href="#cdk-nextjs.NextjsAssetDeploymentOverrides.property.customResourceProps">customResourceProps</a></code> | <code><a href="#cdk-nextjs.OptionalCustomResourceProps">OptionalCustomResourceProps</a></code> | Props that define the custom resource. |
|
|
2179
2092
|
| <code><a href="#cdk-nextjs.NextjsAssetDeploymentOverrides.property.dockerImageFunctionProps">dockerImageFunctionProps</a></code> | <code><a href="#cdk-nextjs.OptionalDockerImageFunctionProps">OptionalDockerImageFunctionProps</a></code> | *No description.* |
|
|
2180
2093
|
|
|
2181
2094
|
---
|
|
2182
2095
|
|
|
2096
|
+
##### `customResourceProps`<sup>Optional</sup> <a name="customResourceProps" id="cdk-nextjs.NextjsAssetDeploymentOverrides.property.customResourceProps"></a>
|
|
2097
|
+
|
|
2098
|
+
```typescript
|
|
2099
|
+
public readonly customResourceProps: OptionalCustomResourceProps;
|
|
2100
|
+
```
|
|
2101
|
+
|
|
2102
|
+
- *Type:* <a href="#cdk-nextjs.OptionalCustomResourceProps">OptionalCustomResourceProps</a>
|
|
2103
|
+
|
|
2104
|
+
Props that define the custom resource.
|
|
2105
|
+
|
|
2106
|
+
---
|
|
2107
|
+
|
|
2183
2108
|
##### `dockerImageFunctionProps`<sup>Optional</sup> <a name="dockerImageFunctionProps" id="cdk-nextjs.NextjsAssetDeploymentOverrides.property.dockerImageFunctionProps"></a>
|
|
2184
2109
|
|
|
2185
2110
|
```typescript
|
|
@@ -2205,14 +2130,15 @@ const nextjsAssetsDeploymentProps: NextjsAssetsDeploymentProps = { ... }
|
|
|
2205
2130
|
| **Name** | **Type** | **Description** |
|
|
2206
2131
|
| --- | --- | --- |
|
|
2207
2132
|
| <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps.property.accessPoint">accessPoint</a></code> | <code>aws-cdk-lib.aws_efs.AccessPoint</code> | *No description.* |
|
|
2133
|
+
| <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps.property.buildId">buildId</a></code> | <code>string</code> | *No description.* |
|
|
2208
2134
|
| <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps.property.buildImageDigest">buildImageDigest</a></code> | <code>string</code> | *No description.* |
|
|
2209
|
-
| <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps.property.containerMountPathForEfs">containerMountPathForEfs</a></code> | <code>string</code> | *No description.* |
|
|
2210
2135
|
| <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps.property.dockerImageCode">dockerImageCode</a></code> | <code>aws-cdk-lib.aws_lambda.DockerImageCode</code> | *No description.* |
|
|
2211
2136
|
| <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps.property.nextjsType">nextjsType</a></code> | <code><a href="#cdk-nextjs.NextjsType">NextjsType</a></code> | *No description.* |
|
|
2212
2137
|
| <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | *No description.* |
|
|
2213
|
-
| <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps.property.
|
|
2138
|
+
| <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps.property.basePath">basePath</a></code> | <code>string</code> | Prefix to the URI path the app will be served at. |
|
|
2139
|
+
| <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps.property.debug">debug</a></code> | <code>boolean</code> | If true, logs details in custom resource lambda. |
|
|
2214
2140
|
| <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps.property.overrides">overrides</a></code> | <code><a href="#cdk-nextjs.NextjsAssetDeploymentOverrides">NextjsAssetDeploymentOverrides</a></code> | *No description.* |
|
|
2215
|
-
| <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps.property.
|
|
2141
|
+
| <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps.property.relativePathToPackage">relativePathToPackage</a></code> | <code>string</code> | *No description.* |
|
|
2216
2142
|
| <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps.property.staticAssetsBucket">staticAssetsBucket</a></code> | <code>aws-cdk-lib.aws_s3.Bucket</code> | Required for `NextjsType.GlobalFunctions` and `NextjsType.GlobalContainers`. |
|
|
2217
2143
|
|
|
2218
2144
|
---
|
|
@@ -2227,27 +2153,25 @@ public readonly accessPoint: AccessPoint;
|
|
|
2227
2153
|
|
|
2228
2154
|
---
|
|
2229
2155
|
|
|
2230
|
-
##### `
|
|
2156
|
+
##### `buildId`<sup>Required</sup> <a name="buildId" id="cdk-nextjs.NextjsAssetsDeploymentProps.property.buildId"></a>
|
|
2231
2157
|
|
|
2232
2158
|
```typescript
|
|
2233
|
-
public readonly
|
|
2159
|
+
public readonly buildId: string;
|
|
2234
2160
|
```
|
|
2235
2161
|
|
|
2236
2162
|
- *Type:* string
|
|
2237
2163
|
|
|
2238
|
-
> [{@link NextjsBuild.buildImageDigest }]({@link NextjsBuild.buildImageDigest })
|
|
2239
|
-
|
|
2240
2164
|
---
|
|
2241
2165
|
|
|
2242
|
-
##### `
|
|
2166
|
+
##### `buildImageDigest`<sup>Required</sup> <a name="buildImageDigest" id="cdk-nextjs.NextjsAssetsDeploymentProps.property.buildImageDigest"></a>
|
|
2243
2167
|
|
|
2244
2168
|
```typescript
|
|
2245
|
-
public readonly
|
|
2169
|
+
public readonly buildImageDigest: string;
|
|
2246
2170
|
```
|
|
2247
2171
|
|
|
2248
2172
|
- *Type:* string
|
|
2249
2173
|
|
|
2250
|
-
> [{@link NextjsBuild.
|
|
2174
|
+
> [{@link NextjsBuild.buildImageDigest }]({@link NextjsBuild.buildImageDigest })
|
|
2251
2175
|
|
|
2252
2176
|
---
|
|
2253
2177
|
|
|
@@ -2281,6 +2205,25 @@ public readonly vpc: IVpc;
|
|
|
2281
2205
|
|
|
2282
2206
|
---
|
|
2283
2207
|
|
|
2208
|
+
##### `basePath`<sup>Optional</sup> <a name="basePath" id="cdk-nextjs.NextjsAssetsDeploymentProps.property.basePath"></a>
|
|
2209
|
+
|
|
2210
|
+
```typescript
|
|
2211
|
+
public readonly basePath: string;
|
|
2212
|
+
```
|
|
2213
|
+
|
|
2214
|
+
- *Type:* string
|
|
2215
|
+
|
|
2216
|
+
Prefix to the URI path the app will be served at.
|
|
2217
|
+
|
|
2218
|
+
---
|
|
2219
|
+
|
|
2220
|
+
*Example*
|
|
2221
|
+
|
|
2222
|
+
```typescript
|
|
2223
|
+
"/my-base-path"
|
|
2224
|
+
```
|
|
2225
|
+
|
|
2226
|
+
|
|
2284
2227
|
##### `debug`<sup>Optional</sup> <a name="debug" id="cdk-nextjs.NextjsAssetsDeploymentProps.property.debug"></a>
|
|
2285
2228
|
|
|
2286
2229
|
```typescript
|
|
@@ -2290,6 +2233,8 @@ public readonly debug: boolean;
|
|
|
2290
2233
|
- *Type:* boolean
|
|
2291
2234
|
- *Default:* true
|
|
2292
2235
|
|
|
2236
|
+
If true, logs details in custom resource lambda.
|
|
2237
|
+
|
|
2293
2238
|
---
|
|
2294
2239
|
|
|
2295
2240
|
##### `overrides`<sup>Optional</sup> <a name="overrides" id="cdk-nextjs.NextjsAssetsDeploymentProps.property.overrides"></a>
|
|
@@ -2302,15 +2247,15 @@ public readonly overrides: NextjsAssetDeploymentOverrides;
|
|
|
2302
2247
|
|
|
2303
2248
|
---
|
|
2304
2249
|
|
|
2305
|
-
##### `
|
|
2250
|
+
##### `relativePathToPackage`<sup>Optional</sup> <a name="relativePathToPackage" id="cdk-nextjs.NextjsAssetsDeploymentProps.property.relativePathToPackage"></a>
|
|
2306
2251
|
|
|
2307
2252
|
```typescript
|
|
2308
|
-
public readonly
|
|
2253
|
+
public readonly relativePathToPackage: string;
|
|
2309
2254
|
```
|
|
2310
2255
|
|
|
2311
2256
|
- *Type:* string
|
|
2312
2257
|
|
|
2313
|
-
> [{@link NextjsBaseProps.
|
|
2258
|
+
> [{@link NextjsBaseProps.relativePathToPackage }]({@link NextjsBaseProps.relativePathToPackage })
|
|
2314
2259
|
|
|
2315
2260
|
---
|
|
2316
2261
|
|
|
@@ -2340,10 +2285,11 @@ const nextjsBaseProps: NextjsBaseProps = { ... }
|
|
|
2340
2285
|
|
|
2341
2286
|
| **Name** | **Type** | **Description** |
|
|
2342
2287
|
| --- | --- | --- |
|
|
2343
|
-
| <code><a href="#cdk-nextjs.NextjsBaseProps.property.buildContext">buildContext</a></code> | <code>string</code> | [Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.
|
|
2288
|
+
| <code><a href="#cdk-nextjs.NextjsBaseProps.property.buildContext">buildContext</a></code> | <code>string</code> | [Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.relativePathToPackage}. |
|
|
2344
2289
|
| <code><a href="#cdk-nextjs.NextjsBaseProps.property.healthCheckPath">healthCheckPath</a></code> | <code>string</code> | Path to API Route Handler that returns HTTP 200 to ensure compute health. |
|
|
2345
2290
|
| <code><a href="#cdk-nextjs.NextjsBaseProps.property.buildCommand">buildCommand</a></code> | <code>string</code> | Command to generate optimized version of your Next.js app in container; |
|
|
2346
|
-
| <code><a href="#cdk-nextjs.NextjsBaseProps.property.
|
|
2291
|
+
| <code><a href="#cdk-nextjs.NextjsBaseProps.property.relativePathToPackage">relativePathToPackage</a></code> | <code>string</code> | Use this if building in monorepo. |
|
|
2292
|
+
| <code><a href="#cdk-nextjs.NextjsBaseProps.property.relativePathToWorkspace">relativePathToWorkspace</a></code> | <code>string</code> | *No description.* |
|
|
2347
2293
|
|
|
2348
2294
|
---
|
|
2349
2295
|
|
|
@@ -2355,14 +2301,20 @@ public readonly buildContext: string;
|
|
|
2355
2301
|
|
|
2356
2302
|
- *Type:* string
|
|
2357
2303
|
|
|
2358
|
-
[Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.
|
|
2304
|
+
[Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.relativePathToPackage}.
|
|
2305
|
+
|
|
2306
|
+
Note, by default cdk-nextjs' `builder.Dockerfile` is used to build your
|
|
2307
|
+
Next.js app. You can customize this by specifying `overrides.{nextjs...}.nextjsBuildProps.builderImageProps.file`.
|
|
2308
|
+
If you override the default, then you are responsible for ensuring the
|
|
2309
|
+
Dockerfile is in the build context directory before cdk-nextjs construct
|
|
2310
|
+
is instantiated.
|
|
2359
2311
|
|
|
2360
2312
|
---
|
|
2361
2313
|
|
|
2362
2314
|
*Example*
|
|
2363
2315
|
|
|
2364
2316
|
```typescript
|
|
2365
|
-
|
|
2317
|
+
join(import.meta.dirname, "..") (monorepo)
|
|
2366
2318
|
```
|
|
2367
2319
|
|
|
2368
2320
|
|
|
@@ -2403,10 +2355,10 @@ Command to generate optimized version of your Next.js app in container;
|
|
|
2403
2355
|
|
|
2404
2356
|
---
|
|
2405
2357
|
|
|
2406
|
-
##### `
|
|
2358
|
+
##### `relativePathToPackage`<sup>Optional</sup> <a name="relativePathToPackage" id="cdk-nextjs.NextjsBaseProps.property.relativePathToPackage"></a>
|
|
2407
2359
|
|
|
2408
2360
|
```typescript
|
|
2409
|
-
public readonly
|
|
2361
|
+
public readonly relativePathToPackage: string;
|
|
2410
2362
|
```
|
|
2411
2363
|
|
|
2412
2364
|
- *Type:* string
|
|
@@ -2414,7 +2366,7 @@ public readonly relativePathToWorkspace: string;
|
|
|
2414
2366
|
Use this if building in monorepo.
|
|
2415
2367
|
|
|
2416
2368
|
This is the relative path from
|
|
2417
|
-
{@link NextjsBaseProps.buildContext} or root workspace to nested
|
|
2369
|
+
{@link NextjsBaseProps.buildContext} or root workspace to nested package
|
|
2418
2370
|
containing Next.js app. See example below:
|
|
2419
2371
|
|
|
2420
2372
|
Let's say you have a monorepo with the following folder structure:
|
|
@@ -2425,15 +2377,14 @@ Let's say you have a monorepo with the following folder structure:
|
|
|
2425
2377
|
- package.json (root)
|
|
2426
2378
|
|
|
2427
2379
|
And your Next.js app directory is the ui folder. Then you would set {@link NextjsBaseProps.buildContext}
|
|
2428
|
-
to `"/absolute/path/to/my-monorepo"` and {@link NextjsBaseProps.
|
|
2380
|
+
to `"/absolute/path/to/my-monorepo"` and {@link NextjsBaseProps.relativePathToPackage}
|
|
2429
2381
|
to `"./packages/ui"`.
|
|
2430
2382
|
|
|
2431
2383
|
Note, setting {@link NextjsBaseProps.buildContext} to the root of your
|
|
2432
2384
|
monorepo will invalidate container runtime (i.e. docker) build cache when any file is
|
|
2433
2385
|
changed in your monorepo. This is slows down deployments. Checkout how you
|
|
2434
2386
|
can use [turbo](https://turbo.build/) in [Deploying with Docker Guide](https://turbo.build/repo/docs/handbook/deploying-with-docker)
|
|
2435
|
-
|
|
2436
|
-
`turbo prune my-app --docker` - no config file required.
|
|
2387
|
+
in the cdk-nextjs/examples/turbo.
|
|
2437
2388
|
|
|
2438
2389
|
---
|
|
2439
2390
|
|
|
@@ -2444,6 +2395,18 @@ to achieve better build caching. It's as easy as running
|
|
|
2444
2395
|
```
|
|
2445
2396
|
|
|
2446
2397
|
|
|
2398
|
+
##### ~~`relativePathToWorkspace`~~<sup>Optional</sup> <a name="relativePathToWorkspace" id="cdk-nextjs.NextjsBaseProps.property.relativePathToWorkspace"></a>
|
|
2399
|
+
|
|
2400
|
+
- *Deprecated:* use relativePathToPackage
|
|
2401
|
+
|
|
2402
|
+
```typescript
|
|
2403
|
+
public readonly relativePathToWorkspace: string;
|
|
2404
|
+
```
|
|
2405
|
+
|
|
2406
|
+
- *Type:* string
|
|
2407
|
+
|
|
2408
|
+
---
|
|
2409
|
+
|
|
2447
2410
|
### NextjsBuildOverrides <a name="NextjsBuildOverrides" id="cdk-nextjs.NextjsBuildOverrides"></a>
|
|
2448
2411
|
|
|
2449
2412
|
#### Initializer <a name="Initializer" id="cdk-nextjs.NextjsBuildOverrides.Initializer"></a>
|
|
@@ -2458,12 +2421,54 @@ const nextjsBuildOverrides: NextjsBuildOverrides = { ... }
|
|
|
2458
2421
|
|
|
2459
2422
|
| **Name** | **Type** | **Description** |
|
|
2460
2423
|
| --- | --- | --- |
|
|
2424
|
+
| <code><a href="#cdk-nextjs.NextjsBuildOverrides.property.assetsDeploymentImageBuildContext">assetsDeploymentImageBuildContext</a></code> | <code>string</code> | Default folder for build context is the "lib/nextjs-build" folder in the installed cdk-nextjs library which has the "assets-deployment.Dockerfile". Note, if you specify this then you're responsible for ensuring the dockerfile is present in the build context directory and any referenced files are present as well. You can specify dockerfile name with adjacent `nextjsAssetDeploymentAssetImageCodeProps.file` property. |
|
|
2425
|
+
| <code><a href="#cdk-nextjs.NextjsBuildOverrides.property.containersImageBuildContext">containersImageBuildContext</a></code> | <code>string</code> | Default folder for build context is the "assets/lambdas/assets-deployment/assets-deployment.lambda" folder in the installed cdk-nextjs library which has the "{...}-containers.Dockerfile". Note, if you specify this then you're responsible for ensuring the dockerfile is present in the build context directory and any referenced files are present as well. You can specify dockerfile name with adjacent `nextjsContainersDockerImageAssetProps.file` property. |
|
|
2426
|
+
| <code><a href="#cdk-nextjs.NextjsBuildOverrides.property.functionsImageBuildContext">functionsImageBuildContext</a></code> | <code>string</code> | Default folder for build context is the "lib/nextjs-build" folder in the installed cdk-nextjs library which has the "global-functions.Dockerfile". Note, if you specify this then you're responsible for ensuring the dockerfile is present in the build context directory and any referenced files are present as well. You can specify dockerfile name with adjacent `nextjsFunctionsAssetImageCodeProps.file` property. |
|
|
2461
2427
|
| <code><a href="#cdk-nextjs.NextjsBuildOverrides.property.nextjsAssetDeploymentAssetImageCodeProps">nextjsAssetDeploymentAssetImageCodeProps</a></code> | <code>aws-cdk-lib.aws_lambda.AssetImageCodeProps</code> | *No description.* |
|
|
2462
2428
|
| <code><a href="#cdk-nextjs.NextjsBuildOverrides.property.nextjsContainersDockerImageAssetProps">nextjsContainersDockerImageAssetProps</a></code> | <code><a href="#cdk-nextjs.OptionalDockerImageAssetProps">OptionalDockerImageAssetProps</a></code> | *No description.* |
|
|
2463
2429
|
| <code><a href="#cdk-nextjs.NextjsBuildOverrides.property.nextjsFunctionsAssetImageCodeProps">nextjsFunctionsAssetImageCodeProps</a></code> | <code>aws-cdk-lib.aws_lambda.AssetImageCodeProps</code> | *No description.* |
|
|
2464
2430
|
|
|
2465
2431
|
---
|
|
2466
2432
|
|
|
2433
|
+
##### `assetsDeploymentImageBuildContext`<sup>Optional</sup> <a name="assetsDeploymentImageBuildContext" id="cdk-nextjs.NextjsBuildOverrides.property.assetsDeploymentImageBuildContext"></a>
|
|
2434
|
+
|
|
2435
|
+
```typescript
|
|
2436
|
+
public readonly assetsDeploymentImageBuildContext: string;
|
|
2437
|
+
```
|
|
2438
|
+
|
|
2439
|
+
- *Type:* string
|
|
2440
|
+
- *Default:* "cdk-nextjs/lib/nextjs-build"
|
|
2441
|
+
|
|
2442
|
+
Default folder for build context is the "lib/nextjs-build" folder in the installed cdk-nextjs library which has the "assets-deployment.Dockerfile". Note, if you specify this then you're responsible for ensuring the dockerfile is present in the build context directory and any referenced files are present as well. You can specify dockerfile name with adjacent `nextjsAssetDeploymentAssetImageCodeProps.file` property.
|
|
2443
|
+
|
|
2444
|
+
---
|
|
2445
|
+
|
|
2446
|
+
##### `containersImageBuildContext`<sup>Optional</sup> <a name="containersImageBuildContext" id="cdk-nextjs.NextjsBuildOverrides.property.containersImageBuildContext"></a>
|
|
2447
|
+
|
|
2448
|
+
```typescript
|
|
2449
|
+
public readonly containersImageBuildContext: string;
|
|
2450
|
+
```
|
|
2451
|
+
|
|
2452
|
+
- *Type:* string
|
|
2453
|
+
- *Default:* "cdk-nextjs/lib/nextjs-build"
|
|
2454
|
+
|
|
2455
|
+
Default folder for build context is the "assets/lambdas/assets-deployment/assets-deployment.lambda" folder in the installed cdk-nextjs library which has the "{...}-containers.Dockerfile". Note, if you specify this then you're responsible for ensuring the dockerfile is present in the build context directory and any referenced files are present as well. You can specify dockerfile name with adjacent `nextjsContainersDockerImageAssetProps.file` property.
|
|
2456
|
+
|
|
2457
|
+
---
|
|
2458
|
+
|
|
2459
|
+
##### `functionsImageBuildContext`<sup>Optional</sup> <a name="functionsImageBuildContext" id="cdk-nextjs.NextjsBuildOverrides.property.functionsImageBuildContext"></a>
|
|
2460
|
+
|
|
2461
|
+
```typescript
|
|
2462
|
+
public readonly functionsImageBuildContext: string;
|
|
2463
|
+
```
|
|
2464
|
+
|
|
2465
|
+
- *Type:* string
|
|
2466
|
+
- *Default:* "cdk-nextjs/lib/nextjs-build"
|
|
2467
|
+
|
|
2468
|
+
Default folder for build context is the "lib/nextjs-build" folder in the installed cdk-nextjs library which has the "global-functions.Dockerfile". Note, if you specify this then you're responsible for ensuring the dockerfile is present in the build context directory and any referenced files are present as well. You can specify dockerfile name with adjacent `nextjsFunctionsAssetImageCodeProps.file` property.
|
|
2469
|
+
|
|
2470
|
+
---
|
|
2471
|
+
|
|
2467
2472
|
##### `nextjsAssetDeploymentAssetImageCodeProps`<sup>Optional</sup> <a name="nextjsAssetDeploymentAssetImageCodeProps" id="cdk-nextjs.NextjsBuildOverrides.property.nextjsAssetDeploymentAssetImageCodeProps"></a>
|
|
2468
2473
|
|
|
2469
2474
|
```typescript
|
|
@@ -2513,7 +2518,7 @@ const nextjsBuildProps: NextjsBuildProps = { ... }
|
|
|
2513
2518
|
| <code><a href="#cdk-nextjs.NextjsBuildProps.property.buildCommand">buildCommand</a></code> | <code>string</code> | *No description.* |
|
|
2514
2519
|
| <code><a href="#cdk-nextjs.NextjsBuildProps.property.builderImageProps">builderImageProps</a></code> | <code><a href="#cdk-nextjs.BuilderImageProps">BuilderImageProps</a></code> | *No description.* |
|
|
2515
2520
|
| <code><a href="#cdk-nextjs.NextjsBuildProps.property.overrides">overrides</a></code> | <code><a href="#cdk-nextjs.NextjsBuildOverrides">NextjsBuildOverrides</a></code> | *No description.* |
|
|
2516
|
-
| <code><a href="#cdk-nextjs.NextjsBuildProps.property.
|
|
2521
|
+
| <code><a href="#cdk-nextjs.NextjsBuildProps.property.relativePathToPackage">relativePathToPackage</a></code> | <code>string</code> | *No description.* |
|
|
2517
2522
|
|
|
2518
2523
|
---
|
|
2519
2524
|
|
|
@@ -2571,15 +2576,15 @@ public readonly overrides: NextjsBuildOverrides;
|
|
|
2571
2576
|
|
|
2572
2577
|
---
|
|
2573
2578
|
|
|
2574
|
-
##### `
|
|
2579
|
+
##### `relativePathToPackage`<sup>Optional</sup> <a name="relativePathToPackage" id="cdk-nextjs.NextjsBuildProps.property.relativePathToPackage"></a>
|
|
2575
2580
|
|
|
2576
2581
|
```typescript
|
|
2577
|
-
public readonly
|
|
2582
|
+
public readonly relativePathToPackage: string;
|
|
2578
2583
|
```
|
|
2579
2584
|
|
|
2580
2585
|
- *Type:* string
|
|
2581
2586
|
|
|
2582
|
-
> [{@link NextjsBaseProps.
|
|
2587
|
+
> [{@link NextjsBaseProps.relativePathToPackage }]({@link NextjsBaseProps.relativePathToPackage })
|
|
2583
2588
|
|
|
2584
2589
|
---
|
|
2585
2590
|
|
|
@@ -2598,7 +2603,6 @@ const nextjsComputeBaseProps: NextjsComputeBaseProps = { ... }
|
|
|
2598
2603
|
| **Name** | **Type** | **Description** |
|
|
2599
2604
|
| --- | --- | --- |
|
|
2600
2605
|
| <code><a href="#cdk-nextjs.NextjsComputeBaseProps.property.accessPoint">accessPoint</a></code> | <code>aws-cdk-lib.aws_efs.AccessPoint</code> | *No description.* |
|
|
2601
|
-
| <code><a href="#cdk-nextjs.NextjsComputeBaseProps.property.containerMountPathForEfs">containerMountPathForEfs</a></code> | <code>string</code> | *No description.* |
|
|
2602
2606
|
| <code><a href="#cdk-nextjs.NextjsComputeBaseProps.property.healthCheckPath">healthCheckPath</a></code> | <code>string</code> | *No description.* |
|
|
2603
2607
|
| <code><a href="#cdk-nextjs.NextjsComputeBaseProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | *No description.* |
|
|
2604
2608
|
|
|
@@ -2614,30 +2618,20 @@ public readonly accessPoint: AccessPoint;
|
|
|
2614
2618
|
|
|
2615
2619
|
---
|
|
2616
2620
|
|
|
2617
|
-
##### `
|
|
2621
|
+
##### `healthCheckPath`<sup>Required</sup> <a name="healthCheckPath" id="cdk-nextjs.NextjsComputeBaseProps.property.healthCheckPath"></a>
|
|
2618
2622
|
|
|
2619
2623
|
```typescript
|
|
2620
|
-
public readonly
|
|
2624
|
+
public readonly healthCheckPath: string;
|
|
2621
2625
|
```
|
|
2622
2626
|
|
|
2623
2627
|
- *Type:* string
|
|
2624
2628
|
|
|
2625
2629
|
---
|
|
2626
2630
|
|
|
2627
|
-
##### `
|
|
2631
|
+
##### `vpc`<sup>Required</sup> <a name="vpc" id="cdk-nextjs.NextjsComputeBaseProps.property.vpc"></a>
|
|
2628
2632
|
|
|
2629
2633
|
```typescript
|
|
2630
|
-
public readonly
|
|
2631
|
-
```
|
|
2632
|
-
|
|
2633
|
-
- *Type:* string
|
|
2634
|
-
|
|
2635
|
-
---
|
|
2636
|
-
|
|
2637
|
-
##### `vpc`<sup>Required</sup> <a name="vpc" id="cdk-nextjs.NextjsComputeBaseProps.property.vpc"></a>
|
|
2638
|
-
|
|
2639
|
-
```typescript
|
|
2640
|
-
public readonly vpc: IVpc;
|
|
2634
|
+
public readonly vpc: IVpc;
|
|
2641
2635
|
```
|
|
2642
2636
|
|
|
2643
2637
|
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
@@ -2709,9 +2703,9 @@ const nextjsContainersProps: NextjsContainersProps = { ... }
|
|
|
2709
2703
|
| **Name** | **Type** | **Description** |
|
|
2710
2704
|
| --- | --- | --- |
|
|
2711
2705
|
| <code><a href="#cdk-nextjs.NextjsContainersProps.property.accessPoint">accessPoint</a></code> | <code>aws-cdk-lib.aws_efs.AccessPoint</code> | *No description.* |
|
|
2712
|
-
| <code><a href="#cdk-nextjs.NextjsContainersProps.property.containerMountPathForEfs">containerMountPathForEfs</a></code> | <code>string</code> | *No description.* |
|
|
2713
2706
|
| <code><a href="#cdk-nextjs.NextjsContainersProps.property.healthCheckPath">healthCheckPath</a></code> | <code>string</code> | *No description.* |
|
|
2714
2707
|
| <code><a href="#cdk-nextjs.NextjsContainersProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | *No description.* |
|
|
2708
|
+
| <code><a href="#cdk-nextjs.NextjsContainersProps.property.buildId">buildId</a></code> | <code>string</code> | *No description.* |
|
|
2715
2709
|
| <code><a href="#cdk-nextjs.NextjsContainersProps.property.dockerImageAsset">dockerImageAsset</a></code> | <code>aws-cdk-lib.aws_ecr_assets.DockerImageAsset</code> | *No description.* |
|
|
2716
2710
|
| <code><a href="#cdk-nextjs.NextjsContainersProps.property.fileSystem">fileSystem</a></code> | <code>aws-cdk-lib.aws_efs.FileSystem</code> | *No description.* |
|
|
2717
2711
|
| <code><a href="#cdk-nextjs.NextjsContainersProps.property.nextjsType">nextjsType</a></code> | <code><a href="#cdk-nextjs.NextjsType">NextjsType</a></code> | *No description.* |
|
|
@@ -2730,33 +2724,33 @@ public readonly accessPoint: AccessPoint;
|
|
|
2730
2724
|
|
|
2731
2725
|
---
|
|
2732
2726
|
|
|
2733
|
-
##### `
|
|
2727
|
+
##### `healthCheckPath`<sup>Required</sup> <a name="healthCheckPath" id="cdk-nextjs.NextjsContainersProps.property.healthCheckPath"></a>
|
|
2734
2728
|
|
|
2735
2729
|
```typescript
|
|
2736
|
-
public readonly
|
|
2730
|
+
public readonly healthCheckPath: string;
|
|
2737
2731
|
```
|
|
2738
2732
|
|
|
2739
2733
|
- *Type:* string
|
|
2740
2734
|
|
|
2741
2735
|
---
|
|
2742
2736
|
|
|
2743
|
-
##### `
|
|
2737
|
+
##### `vpc`<sup>Required</sup> <a name="vpc" id="cdk-nextjs.NextjsContainersProps.property.vpc"></a>
|
|
2744
2738
|
|
|
2745
2739
|
```typescript
|
|
2746
|
-
public readonly
|
|
2740
|
+
public readonly vpc: IVpc;
|
|
2747
2741
|
```
|
|
2748
2742
|
|
|
2749
|
-
- *Type:*
|
|
2743
|
+
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
2750
2744
|
|
|
2751
2745
|
---
|
|
2752
2746
|
|
|
2753
|
-
##### `
|
|
2747
|
+
##### `buildId`<sup>Required</sup> <a name="buildId" id="cdk-nextjs.NextjsContainersProps.property.buildId"></a>
|
|
2754
2748
|
|
|
2755
2749
|
```typescript
|
|
2756
|
-
public readonly
|
|
2750
|
+
public readonly buildId: string;
|
|
2757
2751
|
```
|
|
2758
2752
|
|
|
2759
|
-
- *Type:*
|
|
2753
|
+
- *Type:* string
|
|
2760
2754
|
|
|
2761
2755
|
---
|
|
2762
2756
|
|
|
@@ -3221,9 +3215,9 @@ const nextjsFunctionsProps: NextjsFunctionsProps = { ... }
|
|
|
3221
3215
|
| **Name** | **Type** | **Description** |
|
|
3222
3216
|
| --- | --- | --- |
|
|
3223
3217
|
| <code><a href="#cdk-nextjs.NextjsFunctionsProps.property.accessPoint">accessPoint</a></code> | <code>aws-cdk-lib.aws_efs.AccessPoint</code> | *No description.* |
|
|
3224
|
-
| <code><a href="#cdk-nextjs.NextjsFunctionsProps.property.containerMountPathForEfs">containerMountPathForEfs</a></code> | <code>string</code> | *No description.* |
|
|
3225
3218
|
| <code><a href="#cdk-nextjs.NextjsFunctionsProps.property.healthCheckPath">healthCheckPath</a></code> | <code>string</code> | *No description.* |
|
|
3226
3219
|
| <code><a href="#cdk-nextjs.NextjsFunctionsProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | *No description.* |
|
|
3220
|
+
| <code><a href="#cdk-nextjs.NextjsFunctionsProps.property.buildId">buildId</a></code> | <code>string</code> | *No description.* |
|
|
3227
3221
|
| <code><a href="#cdk-nextjs.NextjsFunctionsProps.property.dockerImageCode">dockerImageCode</a></code> | <code>aws-cdk-lib.aws_lambda.DockerImageCode</code> | *No description.* |
|
|
3228
3222
|
| <code><a href="#cdk-nextjs.NextjsFunctionsProps.property.overrides">overrides</a></code> | <code><a href="#cdk-nextjs.NextjsFunctionsOverrides">NextjsFunctionsOverrides</a></code> | *No description.* |
|
|
3229
3223
|
|
|
@@ -3239,33 +3233,33 @@ public readonly accessPoint: AccessPoint;
|
|
|
3239
3233
|
|
|
3240
3234
|
---
|
|
3241
3235
|
|
|
3242
|
-
##### `
|
|
3236
|
+
##### `healthCheckPath`<sup>Required</sup> <a name="healthCheckPath" id="cdk-nextjs.NextjsFunctionsProps.property.healthCheckPath"></a>
|
|
3243
3237
|
|
|
3244
3238
|
```typescript
|
|
3245
|
-
public readonly
|
|
3239
|
+
public readonly healthCheckPath: string;
|
|
3246
3240
|
```
|
|
3247
3241
|
|
|
3248
3242
|
- *Type:* string
|
|
3249
3243
|
|
|
3250
3244
|
---
|
|
3251
3245
|
|
|
3252
|
-
##### `
|
|
3246
|
+
##### `vpc`<sup>Required</sup> <a name="vpc" id="cdk-nextjs.NextjsFunctionsProps.property.vpc"></a>
|
|
3253
3247
|
|
|
3254
3248
|
```typescript
|
|
3255
|
-
public readonly
|
|
3249
|
+
public readonly vpc: IVpc;
|
|
3256
3250
|
```
|
|
3257
3251
|
|
|
3258
|
-
- *Type:*
|
|
3252
|
+
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
3259
3253
|
|
|
3260
3254
|
---
|
|
3261
3255
|
|
|
3262
|
-
##### `
|
|
3256
|
+
##### `buildId`<sup>Required</sup> <a name="buildId" id="cdk-nextjs.NextjsFunctionsProps.property.buildId"></a>
|
|
3263
3257
|
|
|
3264
3258
|
```typescript
|
|
3265
|
-
public readonly
|
|
3259
|
+
public readonly buildId: string;
|
|
3266
3260
|
```
|
|
3267
3261
|
|
|
3268
|
-
- *Type:*
|
|
3262
|
+
- *Type:* string
|
|
3269
3263
|
|
|
3270
3264
|
---
|
|
3271
3265
|
|
|
@@ -3306,11 +3300,10 @@ const nextjsGlobalContainersConstructOverrides: NextjsGlobalContainersConstructO
|
|
|
3306
3300
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsAssetsDeploymentProps">nextjsAssetsDeploymentProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps">OptionalNextjsAssetsDeploymentProps</a></code> | *No description.* |
|
|
3307
3301
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsBuildProps">nextjsBuildProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsBuildProps">OptionalNextjsBuildProps</a></code> | *No description.* |
|
|
3308
3302
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsFileSystemProps">nextjsFileSystemProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsFileSystemProps">OptionalNextjsFileSystemProps</a></code> | *No description.* |
|
|
3303
|
+
| <code><a href="#cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsPostDeployProps">nextjsPostDeployProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsPostDeployProps">OptionalNextjsPostDeployProps</a></code> | *No description.* |
|
|
3309
3304
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsVpcProps">nextjsVpcProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsVpcProps">OptionalNextjsVpcProps</a></code> | *No description.* |
|
|
3310
3305
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsContainersProps">nextjsContainersProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsContainersProps">OptionalNextjsContainersProps</a></code> | *No description.* |
|
|
3311
3306
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsDistributionProps">nextjsDistributionProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsDistributionProps">OptionalNextjsDistributionProps</a></code> | *No description.* |
|
|
3312
|
-
| <code><a href="#cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsInvalidationProps">nextjsInvalidationProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsInvalidationProps">OptionalNextjsInvalidationProps</a></code> | *No description.* |
|
|
3313
|
-
| <code><a href="#cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsRevalidationProps">nextjsRevalidationProps</a></code> | <code><a href="#cdk-nextjs.NextjsRevalidationProps">NextjsRevalidationProps</a></code> | *No description.* |
|
|
3314
3307
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsStaticAssetsProps">nextjsStaticAssetsProps</a></code> | <code><a href="#cdk-nextjs.NextjsStaticAssetsProps">NextjsStaticAssetsProps</a></code> | *No description.* |
|
|
3315
3308
|
|
|
3316
3309
|
---
|
|
@@ -3345,6 +3338,16 @@ public readonly nextjsFileSystemProps: OptionalNextjsFileSystemProps;
|
|
|
3345
3338
|
|
|
3346
3339
|
---
|
|
3347
3340
|
|
|
3341
|
+
##### `nextjsPostDeployProps`<sup>Optional</sup> <a name="nextjsPostDeployProps" id="cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsPostDeployProps"></a>
|
|
3342
|
+
|
|
3343
|
+
```typescript
|
|
3344
|
+
public readonly nextjsPostDeployProps: OptionalNextjsPostDeployProps;
|
|
3345
|
+
```
|
|
3346
|
+
|
|
3347
|
+
- *Type:* <a href="#cdk-nextjs.OptionalNextjsPostDeployProps">OptionalNextjsPostDeployProps</a>
|
|
3348
|
+
|
|
3349
|
+
---
|
|
3350
|
+
|
|
3348
3351
|
##### `nextjsVpcProps`<sup>Optional</sup> <a name="nextjsVpcProps" id="cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsVpcProps"></a>
|
|
3349
3352
|
|
|
3350
3353
|
```typescript
|
|
@@ -3375,26 +3378,6 @@ public readonly nextjsDistributionProps: OptionalNextjsDistributionProps;
|
|
|
3375
3378
|
|
|
3376
3379
|
---
|
|
3377
3380
|
|
|
3378
|
-
##### `nextjsInvalidationProps`<sup>Optional</sup> <a name="nextjsInvalidationProps" id="cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsInvalidationProps"></a>
|
|
3379
|
-
|
|
3380
|
-
```typescript
|
|
3381
|
-
public readonly nextjsInvalidationProps: OptionalNextjsInvalidationProps;
|
|
3382
|
-
```
|
|
3383
|
-
|
|
3384
|
-
- *Type:* <a href="#cdk-nextjs.OptionalNextjsInvalidationProps">OptionalNextjsInvalidationProps</a>
|
|
3385
|
-
|
|
3386
|
-
---
|
|
3387
|
-
|
|
3388
|
-
##### `nextjsRevalidationProps`<sup>Optional</sup> <a name="nextjsRevalidationProps" id="cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsRevalidationProps"></a>
|
|
3389
|
-
|
|
3390
|
-
```typescript
|
|
3391
|
-
public readonly nextjsRevalidationProps: NextjsRevalidationProps;
|
|
3392
|
-
```
|
|
3393
|
-
|
|
3394
|
-
- *Type:* <a href="#cdk-nextjs.NextjsRevalidationProps">NextjsRevalidationProps</a>
|
|
3395
|
-
|
|
3396
|
-
---
|
|
3397
|
-
|
|
3398
3381
|
##### `nextjsStaticAssetsProps`<sup>Optional</sup> <a name="nextjsStaticAssetsProps" id="cdk-nextjs.NextjsGlobalContainersConstructOverrides.property.nextjsStaticAssetsProps"></a>
|
|
3399
3382
|
|
|
3400
3383
|
```typescript
|
|
@@ -3407,6 +3390,12 @@ public readonly nextjsStaticAssetsProps: NextjsStaticAssetsProps;
|
|
|
3407
3390
|
|
|
3408
3391
|
### NextjsGlobalContainersOverrides <a name="NextjsGlobalContainersOverrides" id="cdk-nextjs.NextjsGlobalContainersOverrides"></a>
|
|
3409
3392
|
|
|
3393
|
+
Overrides for `NextjsGlobalContainers`.
|
|
3394
|
+
|
|
3395
|
+
Overrides are lower level than
|
|
3396
|
+
props and are passed directly to CDK Constructs giving you more control. It's
|
|
3397
|
+
recommended to use caution and review source code so you know how they're used.
|
|
3398
|
+
|
|
3410
3399
|
#### Initializer <a name="Initializer" id="cdk-nextjs.NextjsGlobalContainersOverrides.Initializer"></a>
|
|
3411
3400
|
|
|
3412
3401
|
```typescript
|
|
@@ -3422,11 +3411,11 @@ const nextjsGlobalContainersOverrides: NextjsGlobalContainersOverrides = { ... }
|
|
|
3422
3411
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersOverrides.property.nextjsAssetsDeployment">nextjsAssetsDeployment</a></code> | <code><a href="#cdk-nextjs.NextjsAssetDeploymentOverrides">NextjsAssetDeploymentOverrides</a></code> | *No description.* |
|
|
3423
3412
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersOverrides.property.nextjsBuild">nextjsBuild</a></code> | <code><a href="#cdk-nextjs.NextjsBuildOverrides">NextjsBuildOverrides</a></code> | *No description.* |
|
|
3424
3413
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersOverrides.property.nextjsFileSystem">nextjsFileSystem</a></code> | <code><a href="#cdk-nextjs.NextjsFileSystemOverrides">NextjsFileSystemOverrides</a></code> | *No description.* |
|
|
3414
|
+
| <code><a href="#cdk-nextjs.NextjsGlobalContainersOverrides.property.nextjsPostDeploy">nextjsPostDeploy</a></code> | <code><a href="#cdk-nextjs.NextjsPostDeployOverrides">NextjsPostDeployOverrides</a></code> | *No description.* |
|
|
3425
3415
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersOverrides.property.nextjsVpc">nextjsVpc</a></code> | <code><a href="#cdk-nextjs.NextjsVpcOverrides">NextjsVpcOverrides</a></code> | *No description.* |
|
|
3426
3416
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersOverrides.property.nextjsContainers">nextjsContainers</a></code> | <code><a href="#cdk-nextjs.NextjsContainersOverrides">NextjsContainersOverrides</a></code> | *No description.* |
|
|
3427
3417
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersOverrides.property.nextjsDistribution">nextjsDistribution</a></code> | <code><a href="#cdk-nextjs.NextjsDistributionOverrides">NextjsDistributionOverrides</a></code> | *No description.* |
|
|
3428
3418
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersOverrides.property.nextjsGlobalContainers">nextjsGlobalContainers</a></code> | <code><a href="#cdk-nextjs.NextjsGlobalContainersConstructOverrides">NextjsGlobalContainersConstructOverrides</a></code> | *No description.* |
|
|
3429
|
-
| <code><a href="#cdk-nextjs.NextjsGlobalContainersOverrides.property.nextjsInvalidation">nextjsInvalidation</a></code> | <code><a href="#cdk-nextjs.NextjsInvalidationOverrides">NextjsInvalidationOverrides</a></code> | *No description.* |
|
|
3430
3419
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersOverrides.property.nextjsStaticAssets">nextjsStaticAssets</a></code> | <code><a href="#cdk-nextjs.NextjsStaticAssetsOverrides">NextjsStaticAssetsOverrides</a></code> | *No description.* |
|
|
3431
3420
|
|
|
3432
3421
|
---
|
|
@@ -3461,6 +3450,16 @@ public readonly nextjsFileSystem: NextjsFileSystemOverrides;
|
|
|
3461
3450
|
|
|
3462
3451
|
---
|
|
3463
3452
|
|
|
3453
|
+
##### `nextjsPostDeploy`<sup>Optional</sup> <a name="nextjsPostDeploy" id="cdk-nextjs.NextjsGlobalContainersOverrides.property.nextjsPostDeploy"></a>
|
|
3454
|
+
|
|
3455
|
+
```typescript
|
|
3456
|
+
public readonly nextjsPostDeploy: NextjsPostDeployOverrides;
|
|
3457
|
+
```
|
|
3458
|
+
|
|
3459
|
+
- *Type:* <a href="#cdk-nextjs.NextjsPostDeployOverrides">NextjsPostDeployOverrides</a>
|
|
3460
|
+
|
|
3461
|
+
---
|
|
3462
|
+
|
|
3464
3463
|
##### `nextjsVpc`<sup>Optional</sup> <a name="nextjsVpc" id="cdk-nextjs.NextjsGlobalContainersOverrides.property.nextjsVpc"></a>
|
|
3465
3464
|
|
|
3466
3465
|
```typescript
|
|
@@ -3501,16 +3500,6 @@ public readonly nextjsGlobalContainers: NextjsGlobalContainersConstructOverrides
|
|
|
3501
3500
|
|
|
3502
3501
|
---
|
|
3503
3502
|
|
|
3504
|
-
##### `nextjsInvalidation`<sup>Optional</sup> <a name="nextjsInvalidation" id="cdk-nextjs.NextjsGlobalContainersOverrides.property.nextjsInvalidation"></a>
|
|
3505
|
-
|
|
3506
|
-
```typescript
|
|
3507
|
-
public readonly nextjsInvalidation: NextjsInvalidationOverrides;
|
|
3508
|
-
```
|
|
3509
|
-
|
|
3510
|
-
- *Type:* <a href="#cdk-nextjs.NextjsInvalidationOverrides">NextjsInvalidationOverrides</a>
|
|
3511
|
-
|
|
3512
|
-
---
|
|
3513
|
-
|
|
3514
3503
|
##### `nextjsStaticAssets`<sup>Optional</sup> <a name="nextjsStaticAssets" id="cdk-nextjs.NextjsGlobalContainersOverrides.property.nextjsStaticAssets"></a>
|
|
3515
3504
|
|
|
3516
3505
|
```typescript
|
|
@@ -3535,10 +3524,11 @@ const nextjsGlobalContainersProps: NextjsGlobalContainersProps = { ... }
|
|
|
3535
3524
|
|
|
3536
3525
|
| **Name** | **Type** | **Description** |
|
|
3537
3526
|
| --- | --- | --- |
|
|
3538
|
-
| <code><a href="#cdk-nextjs.NextjsGlobalContainersProps.property.buildContext">buildContext</a></code> | <code>string</code> | [Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.
|
|
3527
|
+
| <code><a href="#cdk-nextjs.NextjsGlobalContainersProps.property.buildContext">buildContext</a></code> | <code>string</code> | [Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.relativePathToPackage}. |
|
|
3539
3528
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersProps.property.healthCheckPath">healthCheckPath</a></code> | <code>string</code> | Path to API Route Handler that returns HTTP 200 to ensure compute health. |
|
|
3540
3529
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersProps.property.buildCommand">buildCommand</a></code> | <code>string</code> | Command to generate optimized version of your Next.js app in container; |
|
|
3541
|
-
| <code><a href="#cdk-nextjs.NextjsGlobalContainersProps.property.
|
|
3530
|
+
| <code><a href="#cdk-nextjs.NextjsGlobalContainersProps.property.relativePathToPackage">relativePathToPackage</a></code> | <code>string</code> | Use this if building in monorepo. |
|
|
3531
|
+
| <code><a href="#cdk-nextjs.NextjsGlobalContainersProps.property.relativePathToWorkspace">relativePathToWorkspace</a></code> | <code>string</code> | *No description.* |
|
|
3542
3532
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersProps.property.basePath">basePath</a></code> | <code>string</code> | Prefix to the URI path the app will be served at. |
|
|
3543
3533
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersProps.property.distribution">distribution</a></code> | <code>aws-cdk-lib.aws_cloudfront.Distribution</code> | Bring your own distribution. |
|
|
3544
3534
|
| <code><a href="#cdk-nextjs.NextjsGlobalContainersProps.property.overrides">overrides</a></code> | <code><a href="#cdk-nextjs.NextjsGlobalContainersOverrides">NextjsGlobalContainersOverrides</a></code> | Override props of any construct. |
|
|
@@ -3553,14 +3543,20 @@ public readonly buildContext: string;
|
|
|
3553
3543
|
|
|
3554
3544
|
- *Type:* string
|
|
3555
3545
|
|
|
3556
|
-
[Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.
|
|
3546
|
+
[Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.relativePathToPackage}.
|
|
3547
|
+
|
|
3548
|
+
Note, by default cdk-nextjs' `builder.Dockerfile` is used to build your
|
|
3549
|
+
Next.js app. You can customize this by specifying `overrides.{nextjs...}.nextjsBuildProps.builderImageProps.file`.
|
|
3550
|
+
If you override the default, then you are responsible for ensuring the
|
|
3551
|
+
Dockerfile is in the build context directory before cdk-nextjs construct
|
|
3552
|
+
is instantiated.
|
|
3557
3553
|
|
|
3558
3554
|
---
|
|
3559
3555
|
|
|
3560
3556
|
*Example*
|
|
3561
3557
|
|
|
3562
3558
|
```typescript
|
|
3563
|
-
|
|
3559
|
+
join(import.meta.dirname, "..") (monorepo)
|
|
3564
3560
|
```
|
|
3565
3561
|
|
|
3566
3562
|
|
|
@@ -3601,10 +3597,10 @@ Command to generate optimized version of your Next.js app in container;
|
|
|
3601
3597
|
|
|
3602
3598
|
---
|
|
3603
3599
|
|
|
3604
|
-
##### `
|
|
3600
|
+
##### `relativePathToPackage`<sup>Optional</sup> <a name="relativePathToPackage" id="cdk-nextjs.NextjsGlobalContainersProps.property.relativePathToPackage"></a>
|
|
3605
3601
|
|
|
3606
3602
|
```typescript
|
|
3607
|
-
public readonly
|
|
3603
|
+
public readonly relativePathToPackage: string;
|
|
3608
3604
|
```
|
|
3609
3605
|
|
|
3610
3606
|
- *Type:* string
|
|
@@ -3612,7 +3608,7 @@ public readonly relativePathToWorkspace: string;
|
|
|
3612
3608
|
Use this if building in monorepo.
|
|
3613
3609
|
|
|
3614
3610
|
This is the relative path from
|
|
3615
|
-
{@link NextjsBaseProps.buildContext} or root workspace to nested
|
|
3611
|
+
{@link NextjsBaseProps.buildContext} or root workspace to nested package
|
|
3616
3612
|
containing Next.js app. See example below:
|
|
3617
3613
|
|
|
3618
3614
|
Let's say you have a monorepo with the following folder structure:
|
|
@@ -3623,15 +3619,14 @@ Let's say you have a monorepo with the following folder structure:
|
|
|
3623
3619
|
- package.json (root)
|
|
3624
3620
|
|
|
3625
3621
|
And your Next.js app directory is the ui folder. Then you would set {@link NextjsBaseProps.buildContext}
|
|
3626
|
-
to `"/absolute/path/to/my-monorepo"` and {@link NextjsBaseProps.
|
|
3622
|
+
to `"/absolute/path/to/my-monorepo"` and {@link NextjsBaseProps.relativePathToPackage}
|
|
3627
3623
|
to `"./packages/ui"`.
|
|
3628
3624
|
|
|
3629
3625
|
Note, setting {@link NextjsBaseProps.buildContext} to the root of your
|
|
3630
3626
|
monorepo will invalidate container runtime (i.e. docker) build cache when any file is
|
|
3631
3627
|
changed in your monorepo. This is slows down deployments. Checkout how you
|
|
3632
3628
|
can use [turbo](https://turbo.build/) in [Deploying with Docker Guide](https://turbo.build/repo/docs/handbook/deploying-with-docker)
|
|
3633
|
-
|
|
3634
|
-
`turbo prune my-app --docker` - no config file required.
|
|
3629
|
+
in the cdk-nextjs/examples/turbo.
|
|
3635
3630
|
|
|
3636
3631
|
---
|
|
3637
3632
|
|
|
@@ -3642,6 +3637,18 @@ to achieve better build caching. It's as easy as running
|
|
|
3642
3637
|
```
|
|
3643
3638
|
|
|
3644
3639
|
|
|
3640
|
+
##### ~~`relativePathToWorkspace`~~<sup>Optional</sup> <a name="relativePathToWorkspace" id="cdk-nextjs.NextjsGlobalContainersProps.property.relativePathToWorkspace"></a>
|
|
3641
|
+
|
|
3642
|
+
- *Deprecated:* use relativePathToPackage
|
|
3643
|
+
|
|
3644
|
+
```typescript
|
|
3645
|
+
public readonly relativePathToWorkspace: string;
|
|
3646
|
+
```
|
|
3647
|
+
|
|
3648
|
+
- *Type:* string
|
|
3649
|
+
|
|
3650
|
+
---
|
|
3651
|
+
|
|
3645
3652
|
##### `basePath`<sup>Optional</sup> <a name="basePath" id="cdk-nextjs.NextjsGlobalContainersProps.property.basePath"></a>
|
|
3646
3653
|
|
|
3647
3654
|
```typescript
|
|
@@ -3708,11 +3715,10 @@ const nextjsGlobalFunctionsConstructOverrides: NextjsGlobalFunctionsConstructOve
|
|
|
3708
3715
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsAssetsDeploymentProps">nextjsAssetsDeploymentProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps">OptionalNextjsAssetsDeploymentProps</a></code> | *No description.* |
|
|
3709
3716
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsBuildProps">nextjsBuildProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsBuildProps">OptionalNextjsBuildProps</a></code> | *No description.* |
|
|
3710
3717
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsFileSystemProps">nextjsFileSystemProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsFileSystemProps">OptionalNextjsFileSystemProps</a></code> | *No description.* |
|
|
3718
|
+
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsPostDeployProps">nextjsPostDeployProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsPostDeployProps">OptionalNextjsPostDeployProps</a></code> | *No description.* |
|
|
3711
3719
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsVpcProps">nextjsVpcProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsVpcProps">OptionalNextjsVpcProps</a></code> | *No description.* |
|
|
3712
3720
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsDistributionProps">nextjsDistributionProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsDistributionProps">OptionalNextjsDistributionProps</a></code> | *No description.* |
|
|
3713
3721
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsFunctionsProps">nextjsFunctionsProps</a></code> | <code><a href="#cdk-nextjs.NextjsFunctionsProps">NextjsFunctionsProps</a></code> | *No description.* |
|
|
3714
|
-
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsInvalidationProps">nextjsInvalidationProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsInvalidationProps">OptionalNextjsInvalidationProps</a></code> | *No description.* |
|
|
3715
|
-
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsRevalidationProps">nextjsRevalidationProps</a></code> | <code><a href="#cdk-nextjs.NextjsRevalidationProps">NextjsRevalidationProps</a></code> | *No description.* |
|
|
3716
3722
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsStaticAssetsProps">nextjsStaticAssetsProps</a></code> | <code><a href="#cdk-nextjs.NextjsStaticAssetsProps">NextjsStaticAssetsProps</a></code> | *No description.* |
|
|
3717
3723
|
|
|
3718
3724
|
---
|
|
@@ -3747,6 +3753,16 @@ public readonly nextjsFileSystemProps: OptionalNextjsFileSystemProps;
|
|
|
3747
3753
|
|
|
3748
3754
|
---
|
|
3749
3755
|
|
|
3756
|
+
##### `nextjsPostDeployProps`<sup>Optional</sup> <a name="nextjsPostDeployProps" id="cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsPostDeployProps"></a>
|
|
3757
|
+
|
|
3758
|
+
```typescript
|
|
3759
|
+
public readonly nextjsPostDeployProps: OptionalNextjsPostDeployProps;
|
|
3760
|
+
```
|
|
3761
|
+
|
|
3762
|
+
- *Type:* <a href="#cdk-nextjs.OptionalNextjsPostDeployProps">OptionalNextjsPostDeployProps</a>
|
|
3763
|
+
|
|
3764
|
+
---
|
|
3765
|
+
|
|
3750
3766
|
##### `nextjsVpcProps`<sup>Optional</sup> <a name="nextjsVpcProps" id="cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsVpcProps"></a>
|
|
3751
3767
|
|
|
3752
3768
|
```typescript
|
|
@@ -3777,26 +3793,6 @@ public readonly nextjsFunctionsProps: NextjsFunctionsProps;
|
|
|
3777
3793
|
|
|
3778
3794
|
---
|
|
3779
3795
|
|
|
3780
|
-
##### `nextjsInvalidationProps`<sup>Optional</sup> <a name="nextjsInvalidationProps" id="cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsInvalidationProps"></a>
|
|
3781
|
-
|
|
3782
|
-
```typescript
|
|
3783
|
-
public readonly nextjsInvalidationProps: OptionalNextjsInvalidationProps;
|
|
3784
|
-
```
|
|
3785
|
-
|
|
3786
|
-
- *Type:* <a href="#cdk-nextjs.OptionalNextjsInvalidationProps">OptionalNextjsInvalidationProps</a>
|
|
3787
|
-
|
|
3788
|
-
---
|
|
3789
|
-
|
|
3790
|
-
##### `nextjsRevalidationProps`<sup>Optional</sup> <a name="nextjsRevalidationProps" id="cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsRevalidationProps"></a>
|
|
3791
|
-
|
|
3792
|
-
```typescript
|
|
3793
|
-
public readonly nextjsRevalidationProps: NextjsRevalidationProps;
|
|
3794
|
-
```
|
|
3795
|
-
|
|
3796
|
-
- *Type:* <a href="#cdk-nextjs.NextjsRevalidationProps">NextjsRevalidationProps</a>
|
|
3797
|
-
|
|
3798
|
-
---
|
|
3799
|
-
|
|
3800
3796
|
##### `nextjsStaticAssetsProps`<sup>Optional</sup> <a name="nextjsStaticAssetsProps" id="cdk-nextjs.NextjsGlobalFunctionsConstructOverrides.property.nextjsStaticAssetsProps"></a>
|
|
3801
3797
|
|
|
3802
3798
|
```typescript
|
|
@@ -3809,6 +3805,12 @@ public readonly nextjsStaticAssetsProps: NextjsStaticAssetsProps;
|
|
|
3809
3805
|
|
|
3810
3806
|
### NextjsGlobalFunctionsOverrides <a name="NextjsGlobalFunctionsOverrides" id="cdk-nextjs.NextjsGlobalFunctionsOverrides"></a>
|
|
3811
3807
|
|
|
3808
|
+
Overrides for `NextjsGlobalFunctions`.
|
|
3809
|
+
|
|
3810
|
+
Overrides are lower level than
|
|
3811
|
+
props and are passed directly to CDK Constructs giving you more control. It's
|
|
3812
|
+
recommended to use caution and review source code so you know how they're used.
|
|
3813
|
+
|
|
3812
3814
|
#### Initializer <a name="Initializer" id="cdk-nextjs.NextjsGlobalFunctionsOverrides.Initializer"></a>
|
|
3813
3815
|
|
|
3814
3816
|
```typescript
|
|
@@ -3824,12 +3826,11 @@ const nextjsGlobalFunctionsOverrides: NextjsGlobalFunctionsOverrides = { ... }
|
|
|
3824
3826
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsAssetsDeployment">nextjsAssetsDeployment</a></code> | <code><a href="#cdk-nextjs.NextjsAssetDeploymentOverrides">NextjsAssetDeploymentOverrides</a></code> | *No description.* |
|
|
3825
3827
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsBuild">nextjsBuild</a></code> | <code><a href="#cdk-nextjs.NextjsBuildOverrides">NextjsBuildOverrides</a></code> | *No description.* |
|
|
3826
3828
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsFileSystem">nextjsFileSystem</a></code> | <code><a href="#cdk-nextjs.NextjsFileSystemOverrides">NextjsFileSystemOverrides</a></code> | *No description.* |
|
|
3829
|
+
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsPostDeploy">nextjsPostDeploy</a></code> | <code><a href="#cdk-nextjs.NextjsPostDeployOverrides">NextjsPostDeployOverrides</a></code> | *No description.* |
|
|
3827
3830
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsVpc">nextjsVpc</a></code> | <code><a href="#cdk-nextjs.NextjsVpcOverrides">NextjsVpcOverrides</a></code> | *No description.* |
|
|
3828
3831
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsDistribution">nextjsDistribution</a></code> | <code><a href="#cdk-nextjs.NextjsDistributionOverrides">NextjsDistributionOverrides</a></code> | *No description.* |
|
|
3829
3832
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsFunctions">nextjsFunctions</a></code> | <code><a href="#cdk-nextjs.NextjsFunctionsOverrides">NextjsFunctionsOverrides</a></code> | *No description.* |
|
|
3830
3833
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsGlobalFunctions">nextjsGlobalFunctions</a></code> | <code><a href="#cdk-nextjs.NextjsGlobalFunctionsConstructOverrides">NextjsGlobalFunctionsConstructOverrides</a></code> | *No description.* |
|
|
3831
|
-
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsInvalidation">nextjsInvalidation</a></code> | <code><a href="#cdk-nextjs.NextjsInvalidationOverrides">NextjsInvalidationOverrides</a></code> | *No description.* |
|
|
3832
|
-
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsRevalidation">nextjsRevalidation</a></code> | <code><a href="#cdk-nextjs.NextjsRevalidationOverrides">NextjsRevalidationOverrides</a></code> | *No description.* |
|
|
3833
3834
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsStaticAssets">nextjsStaticAssets</a></code> | <code><a href="#cdk-nextjs.NextjsStaticAssetsOverrides">NextjsStaticAssetsOverrides</a></code> | *No description.* |
|
|
3834
3835
|
|
|
3835
3836
|
---
|
|
@@ -3864,6 +3865,16 @@ public readonly nextjsFileSystem: NextjsFileSystemOverrides;
|
|
|
3864
3865
|
|
|
3865
3866
|
---
|
|
3866
3867
|
|
|
3868
|
+
##### `nextjsPostDeploy`<sup>Optional</sup> <a name="nextjsPostDeploy" id="cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsPostDeploy"></a>
|
|
3869
|
+
|
|
3870
|
+
```typescript
|
|
3871
|
+
public readonly nextjsPostDeploy: NextjsPostDeployOverrides;
|
|
3872
|
+
```
|
|
3873
|
+
|
|
3874
|
+
- *Type:* <a href="#cdk-nextjs.NextjsPostDeployOverrides">NextjsPostDeployOverrides</a>
|
|
3875
|
+
|
|
3876
|
+
---
|
|
3877
|
+
|
|
3867
3878
|
##### `nextjsVpc`<sup>Optional</sup> <a name="nextjsVpc" id="cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsVpc"></a>
|
|
3868
3879
|
|
|
3869
3880
|
```typescript
|
|
@@ -3904,26 +3915,6 @@ public readonly nextjsGlobalFunctions: NextjsGlobalFunctionsConstructOverrides;
|
|
|
3904
3915
|
|
|
3905
3916
|
---
|
|
3906
3917
|
|
|
3907
|
-
##### `nextjsInvalidation`<sup>Optional</sup> <a name="nextjsInvalidation" id="cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsInvalidation"></a>
|
|
3908
|
-
|
|
3909
|
-
```typescript
|
|
3910
|
-
public readonly nextjsInvalidation: NextjsInvalidationOverrides;
|
|
3911
|
-
```
|
|
3912
|
-
|
|
3913
|
-
- *Type:* <a href="#cdk-nextjs.NextjsInvalidationOverrides">NextjsInvalidationOverrides</a>
|
|
3914
|
-
|
|
3915
|
-
---
|
|
3916
|
-
|
|
3917
|
-
##### `nextjsRevalidation`<sup>Optional</sup> <a name="nextjsRevalidation" id="cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsRevalidation"></a>
|
|
3918
|
-
|
|
3919
|
-
```typescript
|
|
3920
|
-
public readonly nextjsRevalidation: NextjsRevalidationOverrides;
|
|
3921
|
-
```
|
|
3922
|
-
|
|
3923
|
-
- *Type:* <a href="#cdk-nextjs.NextjsRevalidationOverrides">NextjsRevalidationOverrides</a>
|
|
3924
|
-
|
|
3925
|
-
---
|
|
3926
|
-
|
|
3927
3918
|
##### `nextjsStaticAssets`<sup>Optional</sup> <a name="nextjsStaticAssets" id="cdk-nextjs.NextjsGlobalFunctionsOverrides.property.nextjsStaticAssets"></a>
|
|
3928
3919
|
|
|
3929
3920
|
```typescript
|
|
@@ -3948,10 +3939,11 @@ const nextjsGlobalFunctionsProps: NextjsGlobalFunctionsProps = { ... }
|
|
|
3948
3939
|
|
|
3949
3940
|
| **Name** | **Type** | **Description** |
|
|
3950
3941
|
| --- | --- | --- |
|
|
3951
|
-
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsProps.property.buildContext">buildContext</a></code> | <code>string</code> | [Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.
|
|
3942
|
+
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsProps.property.buildContext">buildContext</a></code> | <code>string</code> | [Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.relativePathToPackage}. |
|
|
3952
3943
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsProps.property.healthCheckPath">healthCheckPath</a></code> | <code>string</code> | Path to API Route Handler that returns HTTP 200 to ensure compute health. |
|
|
3953
3944
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsProps.property.buildCommand">buildCommand</a></code> | <code>string</code> | Command to generate optimized version of your Next.js app in container; |
|
|
3954
|
-
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsProps.property.
|
|
3945
|
+
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsProps.property.relativePathToPackage">relativePathToPackage</a></code> | <code>string</code> | Use this if building in monorepo. |
|
|
3946
|
+
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsProps.property.relativePathToWorkspace">relativePathToWorkspace</a></code> | <code>string</code> | *No description.* |
|
|
3955
3947
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsProps.property.basePath">basePath</a></code> | <code>string</code> | Prefix to the URI path the app will be served at. |
|
|
3956
3948
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsProps.property.distribution">distribution</a></code> | <code>aws-cdk-lib.aws_cloudfront.Distribution</code> | Bring your own distribution. |
|
|
3957
3949
|
| <code><a href="#cdk-nextjs.NextjsGlobalFunctionsProps.property.overrides">overrides</a></code> | <code><a href="#cdk-nextjs.NextjsGlobalFunctionsOverrides">NextjsGlobalFunctionsOverrides</a></code> | Override props of any construct. |
|
|
@@ -3966,14 +3958,20 @@ public readonly buildContext: string;
|
|
|
3966
3958
|
|
|
3967
3959
|
- *Type:* string
|
|
3968
3960
|
|
|
3969
|
-
[Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.
|
|
3961
|
+
[Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.relativePathToPackage}.
|
|
3962
|
+
|
|
3963
|
+
Note, by default cdk-nextjs' `builder.Dockerfile` is used to build your
|
|
3964
|
+
Next.js app. You can customize this by specifying `overrides.{nextjs...}.nextjsBuildProps.builderImageProps.file`.
|
|
3965
|
+
If you override the default, then you are responsible for ensuring the
|
|
3966
|
+
Dockerfile is in the build context directory before cdk-nextjs construct
|
|
3967
|
+
is instantiated.
|
|
3970
3968
|
|
|
3971
3969
|
---
|
|
3972
3970
|
|
|
3973
3971
|
*Example*
|
|
3974
3972
|
|
|
3975
3973
|
```typescript
|
|
3976
|
-
|
|
3974
|
+
join(import.meta.dirname, "..") (monorepo)
|
|
3977
3975
|
```
|
|
3978
3976
|
|
|
3979
3977
|
|
|
@@ -4014,10 +4012,10 @@ Command to generate optimized version of your Next.js app in container;
|
|
|
4014
4012
|
|
|
4015
4013
|
---
|
|
4016
4014
|
|
|
4017
|
-
##### `
|
|
4015
|
+
##### `relativePathToPackage`<sup>Optional</sup> <a name="relativePathToPackage" id="cdk-nextjs.NextjsGlobalFunctionsProps.property.relativePathToPackage"></a>
|
|
4018
4016
|
|
|
4019
4017
|
```typescript
|
|
4020
|
-
public readonly
|
|
4018
|
+
public readonly relativePathToPackage: string;
|
|
4021
4019
|
```
|
|
4022
4020
|
|
|
4023
4021
|
- *Type:* string
|
|
@@ -4025,7 +4023,7 @@ public readonly relativePathToWorkspace: string;
|
|
|
4025
4023
|
Use this if building in monorepo.
|
|
4026
4024
|
|
|
4027
4025
|
This is the relative path from
|
|
4028
|
-
{@link NextjsBaseProps.buildContext} or root workspace to nested
|
|
4026
|
+
{@link NextjsBaseProps.buildContext} or root workspace to nested package
|
|
4029
4027
|
containing Next.js app. See example below:
|
|
4030
4028
|
|
|
4031
4029
|
Let's say you have a monorepo with the following folder structure:
|
|
@@ -4036,15 +4034,14 @@ Let's say you have a monorepo with the following folder structure:
|
|
|
4036
4034
|
- package.json (root)
|
|
4037
4035
|
|
|
4038
4036
|
And your Next.js app directory is the ui folder. Then you would set {@link NextjsBaseProps.buildContext}
|
|
4039
|
-
to `"/absolute/path/to/my-monorepo"` and {@link NextjsBaseProps.
|
|
4037
|
+
to `"/absolute/path/to/my-monorepo"` and {@link NextjsBaseProps.relativePathToPackage}
|
|
4040
4038
|
to `"./packages/ui"`.
|
|
4041
4039
|
|
|
4042
4040
|
Note, setting {@link NextjsBaseProps.buildContext} to the root of your
|
|
4043
4041
|
monorepo will invalidate container runtime (i.e. docker) build cache when any file is
|
|
4044
4042
|
changed in your monorepo. This is slows down deployments. Checkout how you
|
|
4045
4043
|
can use [turbo](https://turbo.build/) in [Deploying with Docker Guide](https://turbo.build/repo/docs/handbook/deploying-with-docker)
|
|
4046
|
-
|
|
4047
|
-
`turbo prune my-app --docker` - no config file required.
|
|
4044
|
+
in the cdk-nextjs/examples/turbo.
|
|
4048
4045
|
|
|
4049
4046
|
---
|
|
4050
4047
|
|
|
@@ -4055,6 +4052,18 @@ to achieve better build caching. It's as easy as running
|
|
|
4055
4052
|
```
|
|
4056
4053
|
|
|
4057
4054
|
|
|
4055
|
+
##### ~~`relativePathToWorkspace`~~<sup>Optional</sup> <a name="relativePathToWorkspace" id="cdk-nextjs.NextjsGlobalFunctionsProps.property.relativePathToWorkspace"></a>
|
|
4056
|
+
|
|
4057
|
+
- *Deprecated:* use relativePathToPackage
|
|
4058
|
+
|
|
4059
|
+
```typescript
|
|
4060
|
+
public readonly relativePathToWorkspace: string;
|
|
4061
|
+
```
|
|
4062
|
+
|
|
4063
|
+
- *Type:* string
|
|
4064
|
+
|
|
4065
|
+
---
|
|
4066
|
+
|
|
4058
4067
|
##### `basePath`<sup>Optional</sup> <a name="basePath" id="cdk-nextjs.NextjsGlobalFunctionsProps.property.basePath"></a>
|
|
4059
4068
|
|
|
4060
4069
|
```typescript
|
|
@@ -4104,54 +4113,142 @@ Override props of any construct.
|
|
|
4104
4113
|
|
|
4105
4114
|
---
|
|
4106
4115
|
|
|
4107
|
-
###
|
|
4116
|
+
### NextjsPostDeployOverrides <a name="NextjsPostDeployOverrides" id="cdk-nextjs.NextjsPostDeployOverrides"></a>
|
|
4108
4117
|
|
|
4109
|
-
#### Initializer <a name="Initializer" id="cdk-nextjs.
|
|
4118
|
+
#### Initializer <a name="Initializer" id="cdk-nextjs.NextjsPostDeployOverrides.Initializer"></a>
|
|
4110
4119
|
|
|
4111
4120
|
```typescript
|
|
4112
|
-
import {
|
|
4121
|
+
import { NextjsPostDeployOverrides } from 'cdk-nextjs'
|
|
4113
4122
|
|
|
4114
|
-
const
|
|
4123
|
+
const nextjsPostDeployOverrides: NextjsPostDeployOverrides = { ... }
|
|
4115
4124
|
```
|
|
4116
4125
|
|
|
4117
4126
|
#### Properties <a name="Properties" id="Properties"></a>
|
|
4118
4127
|
|
|
4119
4128
|
| **Name** | **Type** | **Description** |
|
|
4120
4129
|
| --- | --- | --- |
|
|
4121
|
-
| <code><a href="#cdk-nextjs.
|
|
4130
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeployOverrides.property.customResourceProperties">customResourceProperties</a></code> | <code><a href="#cdk-nextjs.OptionalPostDeployCustomResourceProperties">OptionalPostDeployCustomResourceProperties</a></code> | Properties passed into custom resource that are passed to Lambda event handler. |
|
|
4131
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeployOverrides.property.customResourceProps">customResourceProps</a></code> | <code><a href="#cdk-nextjs.OptionalCustomResourceProps">OptionalCustomResourceProps</a></code> | Props that define the custom resource. |
|
|
4132
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeployOverrides.property.functionProps">functionProps</a></code> | <code><a href="#cdk-nextjs.OptionalFunctionProps">OptionalFunctionProps</a></code> | *No description.* |
|
|
4133
|
+
|
|
4134
|
+
---
|
|
4135
|
+
|
|
4136
|
+
##### `customResourceProperties`<sup>Optional</sup> <a name="customResourceProperties" id="cdk-nextjs.NextjsPostDeployOverrides.property.customResourceProperties"></a>
|
|
4137
|
+
|
|
4138
|
+
```typescript
|
|
4139
|
+
public readonly customResourceProperties: OptionalPostDeployCustomResourceProperties;
|
|
4140
|
+
```
|
|
4141
|
+
|
|
4142
|
+
- *Type:* <a href="#cdk-nextjs.OptionalPostDeployCustomResourceProperties">OptionalPostDeployCustomResourceProperties</a>
|
|
4143
|
+
|
|
4144
|
+
Properties passed into custom resource that are passed to Lambda event handler.
|
|
4122
4145
|
|
|
4123
4146
|
---
|
|
4124
4147
|
|
|
4125
|
-
##### `
|
|
4148
|
+
##### `customResourceProps`<sup>Optional</sup> <a name="customResourceProps" id="cdk-nextjs.NextjsPostDeployOverrides.property.customResourceProps"></a>
|
|
4126
4149
|
|
|
4127
4150
|
```typescript
|
|
4128
|
-
public readonly
|
|
4151
|
+
public readonly customResourceProps: OptionalCustomResourceProps;
|
|
4129
4152
|
```
|
|
4130
4153
|
|
|
4131
|
-
- *Type:*
|
|
4154
|
+
- *Type:* <a href="#cdk-nextjs.OptionalCustomResourceProps">OptionalCustomResourceProps</a>
|
|
4155
|
+
|
|
4156
|
+
Props that define the custom resource.
|
|
4132
4157
|
|
|
4133
4158
|
---
|
|
4134
4159
|
|
|
4135
|
-
|
|
4160
|
+
##### `functionProps`<sup>Optional</sup> <a name="functionProps" id="cdk-nextjs.NextjsPostDeployOverrides.property.functionProps"></a>
|
|
4136
4161
|
|
|
4137
|
-
|
|
4162
|
+
```typescript
|
|
4163
|
+
public readonly functionProps: OptionalFunctionProps;
|
|
4164
|
+
```
|
|
4165
|
+
|
|
4166
|
+
- *Type:* <a href="#cdk-nextjs.OptionalFunctionProps">OptionalFunctionProps</a>
|
|
4167
|
+
|
|
4168
|
+
---
|
|
4169
|
+
|
|
4170
|
+
### NextjsPostDeployProps <a name="NextjsPostDeployProps" id="cdk-nextjs.NextjsPostDeployProps"></a>
|
|
4171
|
+
|
|
4172
|
+
#### Initializer <a name="Initializer" id="cdk-nextjs.NextjsPostDeployProps.Initializer"></a>
|
|
4138
4173
|
|
|
4139
4174
|
```typescript
|
|
4140
|
-
import {
|
|
4175
|
+
import { NextjsPostDeployProps } from 'cdk-nextjs'
|
|
4141
4176
|
|
|
4142
|
-
const
|
|
4177
|
+
const nextjsPostDeployProps: NextjsPostDeployProps = { ... }
|
|
4143
4178
|
```
|
|
4144
4179
|
|
|
4145
4180
|
#### Properties <a name="Properties" id="Properties"></a>
|
|
4146
4181
|
|
|
4147
4182
|
| **Name** | **Type** | **Description** |
|
|
4148
4183
|
| --- | --- | --- |
|
|
4149
|
-
| <code><a href="#cdk-nextjs.
|
|
4150
|
-
| <code><a href="#cdk-nextjs.
|
|
4184
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeployProps.property.accessPoint">accessPoint</a></code> | <code>aws-cdk-lib.aws_efs.AccessPoint</code> | *No description.* |
|
|
4185
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeployProps.property.buildId">buildId</a></code> | <code>string</code> | *No description.* |
|
|
4186
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeployProps.property.buildImageDigest">buildImageDigest</a></code> | <code>string</code> | *No description.* |
|
|
4187
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeployProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | *No description.* |
|
|
4188
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeployProps.property.debug">debug</a></code> | <code>boolean</code> | If true, logs details in custom resource lambda. |
|
|
4189
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeployProps.property.distribution">distribution</a></code> | <code>aws-cdk-lib.aws_cloudfront.IDistribution</code> | CloudFront Distribution to invalidate. |
|
|
4190
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeployProps.property.overrides">overrides</a></code> | <code><a href="#cdk-nextjs.NextjsPostDeployOverrides">NextjsPostDeployOverrides</a></code> | Override props for every construct. |
|
|
4191
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeployProps.property.relativePathToPackage">relativePathToPackage</a></code> | <code>string</code> | *No description.* |
|
|
4192
|
+
| <code><a href="#cdk-nextjs.NextjsPostDeployProps.property.staticAssetsBucket">staticAssetsBucket</a></code> | <code>aws-cdk-lib.aws_s3.Bucket</code> | Required for `NextjsType.GlobalFunctions` and `NextjsType.GlobalContainers`. |
|
|
4151
4193
|
|
|
4152
4194
|
---
|
|
4153
4195
|
|
|
4154
|
-
##### `
|
|
4196
|
+
##### `accessPoint`<sup>Required</sup> <a name="accessPoint" id="cdk-nextjs.NextjsPostDeployProps.property.accessPoint"></a>
|
|
4197
|
+
|
|
4198
|
+
```typescript
|
|
4199
|
+
public readonly accessPoint: AccessPoint;
|
|
4200
|
+
```
|
|
4201
|
+
|
|
4202
|
+
- *Type:* aws-cdk-lib.aws_efs.AccessPoint
|
|
4203
|
+
|
|
4204
|
+
---
|
|
4205
|
+
|
|
4206
|
+
##### `buildId`<sup>Required</sup> <a name="buildId" id="cdk-nextjs.NextjsPostDeployProps.property.buildId"></a>
|
|
4207
|
+
|
|
4208
|
+
```typescript
|
|
4209
|
+
public readonly buildId: string;
|
|
4210
|
+
```
|
|
4211
|
+
|
|
4212
|
+
- *Type:* string
|
|
4213
|
+
|
|
4214
|
+
---
|
|
4215
|
+
|
|
4216
|
+
##### `buildImageDigest`<sup>Required</sup> <a name="buildImageDigest" id="cdk-nextjs.NextjsPostDeployProps.property.buildImageDigest"></a>
|
|
4217
|
+
|
|
4218
|
+
```typescript
|
|
4219
|
+
public readonly buildImageDigest: string;
|
|
4220
|
+
```
|
|
4221
|
+
|
|
4222
|
+
- *Type:* string
|
|
4223
|
+
|
|
4224
|
+
> [{@link NextjsBuild.buildImageDigest }]({@link NextjsBuild.buildImageDigest })
|
|
4225
|
+
|
|
4226
|
+
---
|
|
4227
|
+
|
|
4228
|
+
##### `vpc`<sup>Required</sup> <a name="vpc" id="cdk-nextjs.NextjsPostDeployProps.property.vpc"></a>
|
|
4229
|
+
|
|
4230
|
+
```typescript
|
|
4231
|
+
public readonly vpc: IVpc;
|
|
4232
|
+
```
|
|
4233
|
+
|
|
4234
|
+
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
4235
|
+
|
|
4236
|
+
---
|
|
4237
|
+
|
|
4238
|
+
##### `debug`<sup>Optional</sup> <a name="debug" id="cdk-nextjs.NextjsPostDeployProps.property.debug"></a>
|
|
4239
|
+
|
|
4240
|
+
```typescript
|
|
4241
|
+
public readonly debug: boolean;
|
|
4242
|
+
```
|
|
4243
|
+
|
|
4244
|
+
- *Type:* boolean
|
|
4245
|
+
- *Default:* true
|
|
4246
|
+
|
|
4247
|
+
If true, logs details in custom resource lambda.
|
|
4248
|
+
|
|
4249
|
+
---
|
|
4250
|
+
|
|
4251
|
+
##### `distribution`<sup>Optional</sup> <a name="distribution" id="cdk-nextjs.NextjsPostDeployProps.property.distribution"></a>
|
|
4155
4252
|
|
|
4156
4253
|
```typescript
|
|
4157
4254
|
public readonly distribution: IDistribution;
|
|
@@ -4163,18 +4260,42 @@ CloudFront Distribution to invalidate.
|
|
|
4163
4260
|
|
|
4164
4261
|
---
|
|
4165
4262
|
|
|
4166
|
-
##### `overrides`<sup>Optional</sup> <a name="overrides" id="cdk-nextjs.
|
|
4263
|
+
##### `overrides`<sup>Optional</sup> <a name="overrides" id="cdk-nextjs.NextjsPostDeployProps.property.overrides"></a>
|
|
4167
4264
|
|
|
4168
4265
|
```typescript
|
|
4169
|
-
public readonly overrides:
|
|
4266
|
+
public readonly overrides: NextjsPostDeployOverrides;
|
|
4170
4267
|
```
|
|
4171
4268
|
|
|
4172
|
-
- *Type:* <a href="#cdk-nextjs.
|
|
4269
|
+
- *Type:* <a href="#cdk-nextjs.NextjsPostDeployOverrides">NextjsPostDeployOverrides</a>
|
|
4173
4270
|
|
|
4174
4271
|
Override props for every construct.
|
|
4175
4272
|
|
|
4176
4273
|
---
|
|
4177
4274
|
|
|
4275
|
+
##### `relativePathToPackage`<sup>Optional</sup> <a name="relativePathToPackage" id="cdk-nextjs.NextjsPostDeployProps.property.relativePathToPackage"></a>
|
|
4276
|
+
|
|
4277
|
+
```typescript
|
|
4278
|
+
public readonly relativePathToPackage: string;
|
|
4279
|
+
```
|
|
4280
|
+
|
|
4281
|
+
- *Type:* string
|
|
4282
|
+
|
|
4283
|
+
> [{@link NextjsBaseProps.relativePathToPackage }]({@link NextjsBaseProps.relativePathToPackage })
|
|
4284
|
+
|
|
4285
|
+
---
|
|
4286
|
+
|
|
4287
|
+
##### `staticAssetsBucket`<sup>Optional</sup> <a name="staticAssetsBucket" id="cdk-nextjs.NextjsPostDeployProps.property.staticAssetsBucket"></a>
|
|
4288
|
+
|
|
4289
|
+
```typescript
|
|
4290
|
+
public readonly staticAssetsBucket: Bucket;
|
|
4291
|
+
```
|
|
4292
|
+
|
|
4293
|
+
- *Type:* aws-cdk-lib.aws_s3.Bucket
|
|
4294
|
+
|
|
4295
|
+
Required for `NextjsType.GlobalFunctions` and `NextjsType.GlobalContainers`.
|
|
4296
|
+
|
|
4297
|
+
---
|
|
4298
|
+
|
|
4178
4299
|
### NextjsRegionalContainersConstructOverrides <a name="NextjsRegionalContainersConstructOverrides" id="cdk-nextjs.NextjsRegionalContainersConstructOverrides"></a>
|
|
4179
4300
|
|
|
4180
4301
|
#### Initializer <a name="Initializer" id="cdk-nextjs.NextjsRegionalContainersConstructOverrides.Initializer"></a>
|
|
@@ -4192,6 +4313,7 @@ const nextjsRegionalContainersConstructOverrides: NextjsRegionalContainersConstr
|
|
|
4192
4313
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainersConstructOverrides.property.nextjsAssetsDeploymentProps">nextjsAssetsDeploymentProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps">OptionalNextjsAssetsDeploymentProps</a></code> | *No description.* |
|
|
4193
4314
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainersConstructOverrides.property.nextjsBuildProps">nextjsBuildProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsBuildProps">OptionalNextjsBuildProps</a></code> | *No description.* |
|
|
4194
4315
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainersConstructOverrides.property.nextjsFileSystemProps">nextjsFileSystemProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsFileSystemProps">OptionalNextjsFileSystemProps</a></code> | *No description.* |
|
|
4316
|
+
| <code><a href="#cdk-nextjs.NextjsRegionalContainersConstructOverrides.property.nextjsPostDeployProps">nextjsPostDeployProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsPostDeployProps">OptionalNextjsPostDeployProps</a></code> | *No description.* |
|
|
4195
4317
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainersConstructOverrides.property.nextjsVpcProps">nextjsVpcProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsVpcProps">OptionalNextjsVpcProps</a></code> | *No description.* |
|
|
4196
4318
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainersConstructOverrides.property.nextjsContainerProps">nextjsContainerProps</a></code> | <code><a href="#cdk-nextjs.OptionalNextjsContainersProps">OptionalNextjsContainersProps</a></code> | *No description.* |
|
|
4197
4319
|
|
|
@@ -4227,6 +4349,16 @@ public readonly nextjsFileSystemProps: OptionalNextjsFileSystemProps;
|
|
|
4227
4349
|
|
|
4228
4350
|
---
|
|
4229
4351
|
|
|
4352
|
+
##### `nextjsPostDeployProps`<sup>Optional</sup> <a name="nextjsPostDeployProps" id="cdk-nextjs.NextjsRegionalContainersConstructOverrides.property.nextjsPostDeployProps"></a>
|
|
4353
|
+
|
|
4354
|
+
```typescript
|
|
4355
|
+
public readonly nextjsPostDeployProps: OptionalNextjsPostDeployProps;
|
|
4356
|
+
```
|
|
4357
|
+
|
|
4358
|
+
- *Type:* <a href="#cdk-nextjs.OptionalNextjsPostDeployProps">OptionalNextjsPostDeployProps</a>
|
|
4359
|
+
|
|
4360
|
+
---
|
|
4361
|
+
|
|
4230
4362
|
##### `nextjsVpcProps`<sup>Optional</sup> <a name="nextjsVpcProps" id="cdk-nextjs.NextjsRegionalContainersConstructOverrides.property.nextjsVpcProps"></a>
|
|
4231
4363
|
|
|
4232
4364
|
```typescript
|
|
@@ -4249,6 +4381,12 @@ public readonly nextjsContainerProps: OptionalNextjsContainersProps;
|
|
|
4249
4381
|
|
|
4250
4382
|
### NextjsRegionalContainersOverrides <a name="NextjsRegionalContainersOverrides" id="cdk-nextjs.NextjsRegionalContainersOverrides"></a>
|
|
4251
4383
|
|
|
4384
|
+
Overrides for `NextjsRegionalContainers`.
|
|
4385
|
+
|
|
4386
|
+
Overrides are lower level than
|
|
4387
|
+
props and are passed directly to CDK Constructs giving you more control. It's
|
|
4388
|
+
recommended to use caution and review source code so you know how they're used.
|
|
4389
|
+
|
|
4252
4390
|
#### Initializer <a name="Initializer" id="cdk-nextjs.NextjsRegionalContainersOverrides.Initializer"></a>
|
|
4253
4391
|
|
|
4254
4392
|
```typescript
|
|
@@ -4264,6 +4402,7 @@ const nextjsRegionalContainersOverrides: NextjsRegionalContainersOverrides = { .
|
|
|
4264
4402
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainersOverrides.property.nextjsAssetsDeployment">nextjsAssetsDeployment</a></code> | <code><a href="#cdk-nextjs.NextjsAssetDeploymentOverrides">NextjsAssetDeploymentOverrides</a></code> | *No description.* |
|
|
4265
4403
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainersOverrides.property.nextjsBuild">nextjsBuild</a></code> | <code><a href="#cdk-nextjs.NextjsBuildOverrides">NextjsBuildOverrides</a></code> | *No description.* |
|
|
4266
4404
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainersOverrides.property.nextjsFileSystem">nextjsFileSystem</a></code> | <code><a href="#cdk-nextjs.NextjsFileSystemOverrides">NextjsFileSystemOverrides</a></code> | *No description.* |
|
|
4405
|
+
| <code><a href="#cdk-nextjs.NextjsRegionalContainersOverrides.property.nextjsPostDeploy">nextjsPostDeploy</a></code> | <code><a href="#cdk-nextjs.NextjsPostDeployOverrides">NextjsPostDeployOverrides</a></code> | *No description.* |
|
|
4267
4406
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainersOverrides.property.nextjsVpc">nextjsVpc</a></code> | <code><a href="#cdk-nextjs.NextjsVpcOverrides">NextjsVpcOverrides</a></code> | *No description.* |
|
|
4268
4407
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainersOverrides.property.nextjsContainers">nextjsContainers</a></code> | <code><a href="#cdk-nextjs.NextjsContainersOverrides">NextjsContainersOverrides</a></code> | *No description.* |
|
|
4269
4408
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainersOverrides.property.nextjsRegionalContainers">nextjsRegionalContainers</a></code> | <code><a href="#cdk-nextjs.NextjsRegionalContainersConstructOverrides">NextjsRegionalContainersConstructOverrides</a></code> | *No description.* |
|
|
@@ -4300,6 +4439,16 @@ public readonly nextjsFileSystem: NextjsFileSystemOverrides;
|
|
|
4300
4439
|
|
|
4301
4440
|
---
|
|
4302
4441
|
|
|
4442
|
+
##### `nextjsPostDeploy`<sup>Optional</sup> <a name="nextjsPostDeploy" id="cdk-nextjs.NextjsRegionalContainersOverrides.property.nextjsPostDeploy"></a>
|
|
4443
|
+
|
|
4444
|
+
```typescript
|
|
4445
|
+
public readonly nextjsPostDeploy: NextjsPostDeployOverrides;
|
|
4446
|
+
```
|
|
4447
|
+
|
|
4448
|
+
- *Type:* <a href="#cdk-nextjs.NextjsPostDeployOverrides">NextjsPostDeployOverrides</a>
|
|
4449
|
+
|
|
4450
|
+
---
|
|
4451
|
+
|
|
4303
4452
|
##### `nextjsVpc`<sup>Optional</sup> <a name="nextjsVpc" id="cdk-nextjs.NextjsRegionalContainersOverrides.property.nextjsVpc"></a>
|
|
4304
4453
|
|
|
4305
4454
|
```typescript
|
|
@@ -4344,10 +4493,11 @@ const nextjsRegionalContainersProps: NextjsRegionalContainersProps = { ... }
|
|
|
4344
4493
|
|
|
4345
4494
|
| **Name** | **Type** | **Description** |
|
|
4346
4495
|
| --- | --- | --- |
|
|
4347
|
-
| <code><a href="#cdk-nextjs.NextjsRegionalContainersProps.property.buildContext">buildContext</a></code> | <code>string</code> | [Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.
|
|
4496
|
+
| <code><a href="#cdk-nextjs.NextjsRegionalContainersProps.property.buildContext">buildContext</a></code> | <code>string</code> | [Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.relativePathToPackage}. |
|
|
4348
4497
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainersProps.property.healthCheckPath">healthCheckPath</a></code> | <code>string</code> | Path to API Route Handler that returns HTTP 200 to ensure compute health. |
|
|
4349
4498
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainersProps.property.buildCommand">buildCommand</a></code> | <code>string</code> | Command to generate optimized version of your Next.js app in container; |
|
|
4350
|
-
| <code><a href="#cdk-nextjs.NextjsRegionalContainersProps.property.
|
|
4499
|
+
| <code><a href="#cdk-nextjs.NextjsRegionalContainersProps.property.relativePathToPackage">relativePathToPackage</a></code> | <code>string</code> | Use this if building in monorepo. |
|
|
4500
|
+
| <code><a href="#cdk-nextjs.NextjsRegionalContainersProps.property.relativePathToWorkspace">relativePathToWorkspace</a></code> | <code>string</code> | *No description.* |
|
|
4351
4501
|
| <code><a href="#cdk-nextjs.NextjsRegionalContainersProps.property.overrides">overrides</a></code> | <code><a href="#cdk-nextjs.NextjsRegionalContainersOverrides">NextjsRegionalContainersOverrides</a></code> | Override props of any construct. |
|
|
4352
4502
|
|
|
4353
4503
|
---
|
|
@@ -4360,14 +4510,20 @@ public readonly buildContext: string;
|
|
|
4360
4510
|
|
|
4361
4511
|
- *Type:* string
|
|
4362
4512
|
|
|
4363
|
-
[Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.
|
|
4513
|
+
[Build context](https://docs.docker.com/build/building/context/) for `docker build`. This directory should contain your lockfile (i.e. pnpm-lock.yaml) for your Next.js app. If you're not in a monorepo, then this will be the same directory as your Next.js app. If you are in a monorepo, then this value should be the root of your monorepo. You then must pass the relative path to your Next.js app via {@link NextjsBaseProps.relativePathToPackage}.
|
|
4514
|
+
|
|
4515
|
+
Note, by default cdk-nextjs' `builder.Dockerfile` is used to build your
|
|
4516
|
+
Next.js app. You can customize this by specifying `overrides.{nextjs...}.nextjsBuildProps.builderImageProps.file`.
|
|
4517
|
+
If you override the default, then you are responsible for ensuring the
|
|
4518
|
+
Dockerfile is in the build context directory before cdk-nextjs construct
|
|
4519
|
+
is instantiated.
|
|
4364
4520
|
|
|
4365
4521
|
---
|
|
4366
4522
|
|
|
4367
4523
|
*Example*
|
|
4368
4524
|
|
|
4369
4525
|
```typescript
|
|
4370
|
-
|
|
4526
|
+
join(import.meta.dirname, "..") (monorepo)
|
|
4371
4527
|
```
|
|
4372
4528
|
|
|
4373
4529
|
|
|
@@ -4408,10 +4564,10 @@ Command to generate optimized version of your Next.js app in container;
|
|
|
4408
4564
|
|
|
4409
4565
|
---
|
|
4410
4566
|
|
|
4411
|
-
##### `
|
|
4567
|
+
##### `relativePathToPackage`<sup>Optional</sup> <a name="relativePathToPackage" id="cdk-nextjs.NextjsRegionalContainersProps.property.relativePathToPackage"></a>
|
|
4412
4568
|
|
|
4413
4569
|
```typescript
|
|
4414
|
-
public readonly
|
|
4570
|
+
public readonly relativePathToPackage: string;
|
|
4415
4571
|
```
|
|
4416
4572
|
|
|
4417
4573
|
- *Type:* string
|
|
@@ -4419,7 +4575,7 @@ public readonly relativePathToWorkspace: string;
|
|
|
4419
4575
|
Use this if building in monorepo.
|
|
4420
4576
|
|
|
4421
4577
|
This is the relative path from
|
|
4422
|
-
{@link NextjsBaseProps.buildContext} or root workspace to nested
|
|
4578
|
+
{@link NextjsBaseProps.buildContext} or root workspace to nested package
|
|
4423
4579
|
containing Next.js app. See example below:
|
|
4424
4580
|
|
|
4425
4581
|
Let's say you have a monorepo with the following folder structure:
|
|
@@ -4430,15 +4586,14 @@ Let's say you have a monorepo with the following folder structure:
|
|
|
4430
4586
|
- package.json (root)
|
|
4431
4587
|
|
|
4432
4588
|
And your Next.js app directory is the ui folder. Then you would set {@link NextjsBaseProps.buildContext}
|
|
4433
|
-
to `"/absolute/path/to/my-monorepo"` and {@link NextjsBaseProps.
|
|
4589
|
+
to `"/absolute/path/to/my-monorepo"` and {@link NextjsBaseProps.relativePathToPackage}
|
|
4434
4590
|
to `"./packages/ui"`.
|
|
4435
4591
|
|
|
4436
4592
|
Note, setting {@link NextjsBaseProps.buildContext} to the root of your
|
|
4437
4593
|
monorepo will invalidate container runtime (i.e. docker) build cache when any file is
|
|
4438
4594
|
changed in your monorepo. This is slows down deployments. Checkout how you
|
|
4439
4595
|
can use [turbo](https://turbo.build/) in [Deploying with Docker Guide](https://turbo.build/repo/docs/handbook/deploying-with-docker)
|
|
4440
|
-
|
|
4441
|
-
`turbo prune my-app --docker` - no config file required.
|
|
4596
|
+
in the cdk-nextjs/examples/turbo.
|
|
4442
4597
|
|
|
4443
4598
|
---
|
|
4444
4599
|
|
|
@@ -4449,115 +4604,27 @@ to achieve better build caching. It's as easy as running
|
|
|
4449
4604
|
```
|
|
4450
4605
|
|
|
4451
4606
|
|
|
4452
|
-
#####
|
|
4453
|
-
|
|
4454
|
-
```typescript
|
|
4455
|
-
public readonly overrides: NextjsRegionalContainersOverrides;
|
|
4456
|
-
```
|
|
4457
|
-
|
|
4458
|
-
- *Type:* <a href="#cdk-nextjs.NextjsRegionalContainersOverrides">NextjsRegionalContainersOverrides</a>
|
|
4459
|
-
|
|
4460
|
-
Override props of any construct.
|
|
4461
|
-
|
|
4462
|
-
---
|
|
4463
|
-
|
|
4464
|
-
### NextjsRevalidationOverrides <a name="NextjsRevalidationOverrides" id="cdk-nextjs.NextjsRevalidationOverrides"></a>
|
|
4607
|
+
##### ~~`relativePathToWorkspace`~~<sup>Optional</sup> <a name="relativePathToWorkspace" id="cdk-nextjs.NextjsRegionalContainersProps.property.relativePathToWorkspace"></a>
|
|
4465
4608
|
|
|
4466
|
-
|
|
4609
|
+
- *Deprecated:* use relativePathToPackage
|
|
4467
4610
|
|
|
4468
4611
|
```typescript
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
const nextjsRevalidationOverrides: NextjsRevalidationOverrides = { ... }
|
|
4472
|
-
```
|
|
4473
|
-
|
|
4474
|
-
#### Properties <a name="Properties" id="Properties"></a>
|
|
4475
|
-
|
|
4476
|
-
| **Name** | **Type** | **Description** |
|
|
4477
|
-
| --- | --- | --- |
|
|
4478
|
-
| <code><a href="#cdk-nextjs.NextjsRevalidationOverrides.property.functionProps">functionProps</a></code> | <code><a href="#cdk-nextjs.OptionalFunctionProps">OptionalFunctionProps</a></code> | *No description.* |
|
|
4479
|
-
| <code><a href="#cdk-nextjs.NextjsRevalidationOverrides.property.queueProps">queueProps</a></code> | <code>aws-cdk-lib.aws_sqs.QueueProps</code> | *No description.* |
|
|
4480
|
-
| <code><a href="#cdk-nextjs.NextjsRevalidationOverrides.property.sqsEventSourceProps">sqsEventSourceProps</a></code> | <code>aws-cdk-lib.aws_lambda_event_sources.SqsEventSourceProps</code> | *No description.* |
|
|
4481
|
-
|
|
4482
|
-
---
|
|
4483
|
-
|
|
4484
|
-
##### `functionProps`<sup>Optional</sup> <a name="functionProps" id="cdk-nextjs.NextjsRevalidationOverrides.property.functionProps"></a>
|
|
4485
|
-
|
|
4486
|
-
```typescript
|
|
4487
|
-
public readonly functionProps: OptionalFunctionProps;
|
|
4488
|
-
```
|
|
4489
|
-
|
|
4490
|
-
- *Type:* <a href="#cdk-nextjs.OptionalFunctionProps">OptionalFunctionProps</a>
|
|
4491
|
-
|
|
4492
|
-
---
|
|
4493
|
-
|
|
4494
|
-
##### `queueProps`<sup>Optional</sup> <a name="queueProps" id="cdk-nextjs.NextjsRevalidationOverrides.property.queueProps"></a>
|
|
4495
|
-
|
|
4496
|
-
```typescript
|
|
4497
|
-
public readonly queueProps: QueueProps;
|
|
4498
|
-
```
|
|
4499
|
-
|
|
4500
|
-
- *Type:* aws-cdk-lib.aws_sqs.QueueProps
|
|
4501
|
-
|
|
4502
|
-
---
|
|
4503
|
-
|
|
4504
|
-
##### `sqsEventSourceProps`<sup>Optional</sup> <a name="sqsEventSourceProps" id="cdk-nextjs.NextjsRevalidationOverrides.property.sqsEventSourceProps"></a>
|
|
4505
|
-
|
|
4506
|
-
```typescript
|
|
4507
|
-
public readonly sqsEventSourceProps: SqsEventSourceProps;
|
|
4508
|
-
```
|
|
4509
|
-
|
|
4510
|
-
- *Type:* aws-cdk-lib.aws_lambda_event_sources.SqsEventSourceProps
|
|
4511
|
-
|
|
4512
|
-
---
|
|
4513
|
-
|
|
4514
|
-
### NextjsRevalidationProps <a name="NextjsRevalidationProps" id="cdk-nextjs.NextjsRevalidationProps"></a>
|
|
4515
|
-
|
|
4516
|
-
#### Initializer <a name="Initializer" id="cdk-nextjs.NextjsRevalidationProps.Initializer"></a>
|
|
4517
|
-
|
|
4518
|
-
```typescript
|
|
4519
|
-
import { NextjsRevalidationProps } from 'cdk-nextjs'
|
|
4520
|
-
|
|
4521
|
-
const nextjsRevalidationProps: NextjsRevalidationProps = { ... }
|
|
4522
|
-
```
|
|
4523
|
-
|
|
4524
|
-
#### Properties <a name="Properties" id="Properties"></a>
|
|
4525
|
-
|
|
4526
|
-
| **Name** | **Type** | **Description** |
|
|
4527
|
-
| --- | --- | --- |
|
|
4528
|
-
| <code><a href="#cdk-nextjs.NextjsRevalidationProps.property.fn">fn</a></code> | <code>aws-cdk-lib.aws_lambda.Function</code> | *No description.* |
|
|
4529
|
-
| <code><a href="#cdk-nextjs.NextjsRevalidationProps.property.previewModeId">previewModeId</a></code> | <code>string</code> | *No description.* |
|
|
4530
|
-
| <code><a href="#cdk-nextjs.NextjsRevalidationProps.property.overrides">overrides</a></code> | <code><a href="#cdk-nextjs.NextjsRevalidationOverrides">NextjsRevalidationOverrides</a></code> | *No description.* |
|
|
4531
|
-
|
|
4532
|
-
---
|
|
4533
|
-
|
|
4534
|
-
##### `fn`<sup>Required</sup> <a name="fn" id="cdk-nextjs.NextjsRevalidationProps.property.fn"></a>
|
|
4535
|
-
|
|
4536
|
-
```typescript
|
|
4537
|
-
public readonly fn: Function;
|
|
4538
|
-
```
|
|
4539
|
-
|
|
4540
|
-
- *Type:* aws-cdk-lib.aws_lambda.Function
|
|
4541
|
-
|
|
4542
|
-
---
|
|
4543
|
-
|
|
4544
|
-
##### `previewModeId`<sup>Required</sup> <a name="previewModeId" id="cdk-nextjs.NextjsRevalidationProps.property.previewModeId"></a>
|
|
4545
|
-
|
|
4546
|
-
```typescript
|
|
4547
|
-
public readonly previewModeId: string;
|
|
4612
|
+
public readonly relativePathToWorkspace: string;
|
|
4548
4613
|
```
|
|
4549
4614
|
|
|
4550
4615
|
- *Type:* string
|
|
4551
4616
|
|
|
4552
4617
|
---
|
|
4553
4618
|
|
|
4554
|
-
##### `overrides`<sup>Optional</sup> <a name="overrides" id="cdk-nextjs.
|
|
4619
|
+
##### `overrides`<sup>Optional</sup> <a name="overrides" id="cdk-nextjs.NextjsRegionalContainersProps.property.overrides"></a>
|
|
4555
4620
|
|
|
4556
4621
|
```typescript
|
|
4557
|
-
public readonly overrides:
|
|
4622
|
+
public readonly overrides: NextjsRegionalContainersOverrides;
|
|
4558
4623
|
```
|
|
4559
4624
|
|
|
4560
|
-
- *Type:* <a href="#cdk-nextjs.
|
|
4625
|
+
- *Type:* <a href="#cdk-nextjs.NextjsRegionalContainersOverrides">NextjsRegionalContainersOverrides</a>
|
|
4626
|
+
|
|
4627
|
+
Override props of any construct.
|
|
4561
4628
|
|
|
4562
4629
|
---
|
|
4563
4630
|
|
|
@@ -5136,59 +5203,228 @@ public readonly defaultCloudMapNamespace: CloudMapNamespaceOptions;
|
|
|
5136
5203
|
- *Type:* aws-cdk-lib.aws_ecs.CloudMapNamespaceOptions
|
|
5137
5204
|
- *Default:* no service discovery namespace created, you can use `addDefaultCloudMapNamespace` to add a default service discovery namespace later.
|
|
5138
5205
|
|
|
5139
|
-
The service discovery namespace created in this cluster.
|
|
5206
|
+
The service discovery namespace created in this cluster.
|
|
5207
|
+
|
|
5208
|
+
---
|
|
5209
|
+
|
|
5210
|
+
##### `enableFargateCapacityProviders`<sup>Optional</sup> <a name="enableFargateCapacityProviders" id="cdk-nextjs.OptionalClusterProps.property.enableFargateCapacityProviders"></a>
|
|
5211
|
+
|
|
5212
|
+
```typescript
|
|
5213
|
+
public readonly enableFargateCapacityProviders: boolean;
|
|
5214
|
+
```
|
|
5215
|
+
|
|
5216
|
+
- *Type:* boolean
|
|
5217
|
+
- *Default:* false
|
|
5218
|
+
|
|
5219
|
+
Whether to enable Fargate Capacity Providers.
|
|
5220
|
+
|
|
5221
|
+
---
|
|
5222
|
+
|
|
5223
|
+
##### `executeCommandConfiguration`<sup>Optional</sup> <a name="executeCommandConfiguration" id="cdk-nextjs.OptionalClusterProps.property.executeCommandConfiguration"></a>
|
|
5224
|
+
|
|
5225
|
+
```typescript
|
|
5226
|
+
public readonly executeCommandConfiguration: ExecuteCommandConfiguration;
|
|
5227
|
+
```
|
|
5228
|
+
|
|
5229
|
+
- *Type:* aws-cdk-lib.aws_ecs.ExecuteCommandConfiguration
|
|
5230
|
+
- *Default:* no configuration will be provided.
|
|
5231
|
+
|
|
5232
|
+
The execute command configuration for the cluster.
|
|
5233
|
+
|
|
5234
|
+
---
|
|
5235
|
+
|
|
5236
|
+
##### `managedStorageConfiguration`<sup>Optional</sup> <a name="managedStorageConfiguration" id="cdk-nextjs.OptionalClusterProps.property.managedStorageConfiguration"></a>
|
|
5237
|
+
|
|
5238
|
+
```typescript
|
|
5239
|
+
public readonly managedStorageConfiguration: ManagedStorageConfiguration;
|
|
5240
|
+
```
|
|
5241
|
+
|
|
5242
|
+
- *Type:* aws-cdk-lib.aws_ecs.ManagedStorageConfiguration
|
|
5243
|
+
- *Default:* no encryption will be applied.
|
|
5244
|
+
|
|
5245
|
+
Encryption configuration for ECS Managed storage.
|
|
5246
|
+
|
|
5247
|
+
---
|
|
5248
|
+
|
|
5249
|
+
##### `vpc`<sup>Optional</sup> <a name="vpc" id="cdk-nextjs.OptionalClusterProps.property.vpc"></a>
|
|
5250
|
+
|
|
5251
|
+
```typescript
|
|
5252
|
+
public readonly vpc: IVpc;
|
|
5253
|
+
```
|
|
5254
|
+
|
|
5255
|
+
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
5256
|
+
- *Default:* creates a new VPC with two AZs
|
|
5257
|
+
|
|
5258
|
+
The VPC where your ECS instances will be running or your ENIs will be deployed.
|
|
5259
|
+
|
|
5260
|
+
---
|
|
5261
|
+
|
|
5262
|
+
### OptionalCustomResourceProps <a name="OptionalCustomResourceProps" id="cdk-nextjs.OptionalCustomResourceProps"></a>
|
|
5263
|
+
|
|
5264
|
+
OptionalCustomResourceProps.
|
|
5265
|
+
|
|
5266
|
+
#### Initializer <a name="Initializer" id="cdk-nextjs.OptionalCustomResourceProps.Initializer"></a>
|
|
5267
|
+
|
|
5268
|
+
```typescript
|
|
5269
|
+
import { OptionalCustomResourceProps } from 'cdk-nextjs'
|
|
5270
|
+
|
|
5271
|
+
const optionalCustomResourceProps: OptionalCustomResourceProps = { ... }
|
|
5272
|
+
```
|
|
5273
|
+
|
|
5274
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
5275
|
+
|
|
5276
|
+
| **Name** | **Type** | **Description** |
|
|
5277
|
+
| --- | --- | --- |
|
|
5278
|
+
| <code><a href="#cdk-nextjs.OptionalCustomResourceProps.property.pascalCaseProperties">pascalCaseProperties</a></code> | <code>boolean</code> | Convert all property keys to pascal case. |
|
|
5279
|
+
| <code><a href="#cdk-nextjs.OptionalCustomResourceProps.property.properties">properties</a></code> | <code>{[ key: string ]: any}</code> | Properties to pass to the Lambda. |
|
|
5280
|
+
| <code><a href="#cdk-nextjs.OptionalCustomResourceProps.property.removalPolicy">removalPolicy</a></code> | <code>aws-cdk-lib.RemovalPolicy</code> | The policy to apply when this resource is removed from the application. |
|
|
5281
|
+
| <code><a href="#cdk-nextjs.OptionalCustomResourceProps.property.resourceType">resourceType</a></code> | <code>string</code> | For custom resources, you can specify AWS::CloudFormation::CustomResource (the default) as the resource type, or you can specify your own resource type name. |
|
|
5282
|
+
| <code><a href="#cdk-nextjs.OptionalCustomResourceProps.property.serviceTimeout">serviceTimeout</a></code> | <code>aws-cdk-lib.Duration</code> | The maximum time that can elapse before a custom resource operation times out. |
|
|
5283
|
+
| <code><a href="#cdk-nextjs.OptionalCustomResourceProps.property.serviceToken">serviceToken</a></code> | <code>string</code> | The ARN of the provider which implements this custom resource type. |
|
|
5284
|
+
|
|
5285
|
+
---
|
|
5286
|
+
|
|
5287
|
+
##### `pascalCaseProperties`<sup>Optional</sup> <a name="pascalCaseProperties" id="cdk-nextjs.OptionalCustomResourceProps.property.pascalCaseProperties"></a>
|
|
5288
|
+
|
|
5289
|
+
```typescript
|
|
5290
|
+
public readonly pascalCaseProperties: boolean;
|
|
5291
|
+
```
|
|
5292
|
+
|
|
5293
|
+
- *Type:* boolean
|
|
5294
|
+
- *Default:* false
|
|
5295
|
+
|
|
5296
|
+
Convert all property keys to pascal case.
|
|
5297
|
+
|
|
5298
|
+
---
|
|
5299
|
+
|
|
5300
|
+
##### `properties`<sup>Optional</sup> <a name="properties" id="cdk-nextjs.OptionalCustomResourceProps.property.properties"></a>
|
|
5301
|
+
|
|
5302
|
+
```typescript
|
|
5303
|
+
public readonly properties: {[ key: string ]: any};
|
|
5304
|
+
```
|
|
5305
|
+
|
|
5306
|
+
- *Type:* {[ key: string ]: any}
|
|
5307
|
+
- *Default:* No properties.
|
|
5308
|
+
|
|
5309
|
+
Properties to pass to the Lambda.
|
|
5310
|
+
|
|
5311
|
+
Values in this `properties` dictionary can possibly overwrite other values in `CustomResourceProps`
|
|
5312
|
+
E.g. `ServiceToken` and `ServiceTimeout`
|
|
5313
|
+
It is recommended to avoid using same keys that exist in `CustomResourceProps`
|
|
5314
|
+
|
|
5315
|
+
---
|
|
5316
|
+
|
|
5317
|
+
##### `removalPolicy`<sup>Optional</sup> <a name="removalPolicy" id="cdk-nextjs.OptionalCustomResourceProps.property.removalPolicy"></a>
|
|
5318
|
+
|
|
5319
|
+
```typescript
|
|
5320
|
+
public readonly removalPolicy: RemovalPolicy;
|
|
5321
|
+
```
|
|
5322
|
+
|
|
5323
|
+
- *Type:* aws-cdk-lib.RemovalPolicy
|
|
5324
|
+
- *Default:* cdk.RemovalPolicy.Destroy
|
|
5325
|
+
|
|
5326
|
+
The policy to apply when this resource is removed from the application.
|
|
5327
|
+
|
|
5328
|
+
---
|
|
5329
|
+
|
|
5330
|
+
##### `resourceType`<sup>Optional</sup> <a name="resourceType" id="cdk-nextjs.OptionalCustomResourceProps.property.resourceType"></a>
|
|
5331
|
+
|
|
5332
|
+
```typescript
|
|
5333
|
+
public readonly resourceType: string;
|
|
5334
|
+
```
|
|
5335
|
+
|
|
5336
|
+
- *Type:* string
|
|
5337
|
+
- *Default:* AWS::CloudFormation::CustomResource
|
|
5338
|
+
|
|
5339
|
+
For custom resources, you can specify AWS::CloudFormation::CustomResource (the default) as the resource type, or you can specify your own resource type name.
|
|
5340
|
+
|
|
5341
|
+
For example, you can use "Custom::MyCustomResourceTypeName".
|
|
5342
|
+
|
|
5343
|
+
Custom resource type names must begin with "Custom::" and can include
|
|
5344
|
+
alphanumeric characters and the following characters: _@-. You can specify
|
|
5345
|
+
a custom resource type name up to a maximum length of 60 characters. You
|
|
5346
|
+
cannot change the type during an update.
|
|
5347
|
+
|
|
5348
|
+
Using your own resource type names helps you quickly differentiate the
|
|
5349
|
+
types of custom resources in your stack. For example, if you had two custom
|
|
5350
|
+
resources that conduct two different ping tests, you could name their type
|
|
5351
|
+
as Custom::PingTester to make them easily identifiable as ping testers
|
|
5352
|
+
(instead of using AWS::CloudFormation::CustomResource).
|
|
5140
5353
|
|
|
5141
5354
|
---
|
|
5142
5355
|
|
|
5143
|
-
##### `
|
|
5356
|
+
##### `serviceTimeout`<sup>Optional</sup> <a name="serviceTimeout" id="cdk-nextjs.OptionalCustomResourceProps.property.serviceTimeout"></a>
|
|
5144
5357
|
|
|
5145
5358
|
```typescript
|
|
5146
|
-
public readonly
|
|
5359
|
+
public readonly serviceTimeout: Duration;
|
|
5147
5360
|
```
|
|
5148
5361
|
|
|
5149
|
-
- *Type:*
|
|
5150
|
-
- *Default:*
|
|
5362
|
+
- *Type:* aws-cdk-lib.Duration
|
|
5363
|
+
- *Default:* Duration.seconds(3600)
|
|
5151
5364
|
|
|
5152
|
-
|
|
5365
|
+
The maximum time that can elapse before a custom resource operation times out.
|
|
5366
|
+
|
|
5367
|
+
The value must be between 1 second and 3600 seconds.
|
|
5368
|
+
|
|
5369
|
+
Maps to [ServiceTimeout](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-customresource.html#cfn-cloudformation-customresource-servicetimeout) property for the `AWS::CloudFormation::CustomResource` resource
|
|
5370
|
+
|
|
5371
|
+
A token can be specified for this property, but it must be specified with `Duration.seconds()`.
|
|
5153
5372
|
|
|
5154
5373
|
---
|
|
5155
5374
|
|
|
5156
|
-
##### `
|
|
5375
|
+
##### `serviceToken`<sup>Optional</sup> <a name="serviceToken" id="cdk-nextjs.OptionalCustomResourceProps.property.serviceToken"></a>
|
|
5157
5376
|
|
|
5158
5377
|
```typescript
|
|
5159
|
-
public readonly
|
|
5378
|
+
public readonly serviceToken: string;
|
|
5160
5379
|
```
|
|
5161
5380
|
|
|
5162
|
-
- *Type:*
|
|
5163
|
-
- *Default:* no configuration will be provided.
|
|
5164
|
-
|
|
5165
|
-
The execute command configuration for the cluster.
|
|
5381
|
+
- *Type:* string
|
|
5166
5382
|
|
|
5167
|
-
|
|
5383
|
+
The ARN of the provider which implements this custom resource type.
|
|
5168
5384
|
|
|
5169
|
-
|
|
5385
|
+
You can implement a provider by listening to raw AWS CloudFormation events
|
|
5386
|
+
and specify the ARN of an SNS topic (`topic.topicArn`) or the ARN of an AWS
|
|
5387
|
+
Lambda function (`lambda.functionArn`) or use the CDK's custom [resource
|
|
5388
|
+
provider framework] which makes it easier to implement robust providers.
|
|
5170
5389
|
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
```
|
|
5390
|
+
[resource provider framework]:
|
|
5391
|
+
https://docs.aws.amazon.com/cdk/api/latest/docs/custom-resources-readme.html
|
|
5174
5392
|
|
|
5175
|
-
|
|
5176
|
-
- *Default:* no encryption will be applied.
|
|
5393
|
+
Provider framework:
|
|
5177
5394
|
|
|
5178
|
-
|
|
5395
|
+
```ts
|
|
5396
|
+
// use the provider framework from aws-cdk/custom-resources:
|
|
5397
|
+
const provider = new customresources.Provider(this, 'ResourceProvider', {
|
|
5398
|
+
onEventHandler,
|
|
5399
|
+
isCompleteHandler, // optional
|
|
5400
|
+
});
|
|
5179
5401
|
|
|
5180
|
-
|
|
5402
|
+
new CustomResource(this, 'MyResource', {
|
|
5403
|
+
serviceToken: provider.serviceToken,
|
|
5404
|
+
});
|
|
5405
|
+
```
|
|
5181
5406
|
|
|
5182
|
-
|
|
5407
|
+
AWS Lambda function (not recommended to use AWS Lambda Functions directly,
|
|
5408
|
+
see the module README):
|
|
5183
5409
|
|
|
5184
|
-
```
|
|
5185
|
-
|
|
5410
|
+
```ts
|
|
5411
|
+
// invoke an AWS Lambda function when a lifecycle event occurs:
|
|
5412
|
+
new CustomResource(this, 'MyResource', {
|
|
5413
|
+
serviceToken: myFunction.functionArn,
|
|
5414
|
+
});
|
|
5186
5415
|
```
|
|
5187
5416
|
|
|
5188
|
-
|
|
5189
|
-
|
|
5417
|
+
SNS topic (not recommended to use AWS Lambda Functions directly, see the
|
|
5418
|
+
module README):
|
|
5190
5419
|
|
|
5191
|
-
|
|
5420
|
+
```ts
|
|
5421
|
+
// publish lifecycle events to an SNS topic:
|
|
5422
|
+
new CustomResource(this, 'MyResource', {
|
|
5423
|
+
serviceToken: myTopic.topicArn,
|
|
5424
|
+
});
|
|
5425
|
+
```
|
|
5426
|
+
|
|
5427
|
+
Maps to [ServiceToken](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-cloudformation-customresource.html#cfn-cloudformation-customresource-servicetoken) property for the `AWS::CloudFormation::CustomResource` resource
|
|
5192
5428
|
|
|
5193
5429
|
---
|
|
5194
5430
|
|
|
@@ -5553,6 +5789,7 @@ const optionalDockerImageAssetProps: OptionalDockerImageAssetProps = { ... }
|
|
|
5553
5789
|
| <code><a href="#cdk-nextjs.OptionalDockerImageAssetProps.property.cacheFrom">cacheFrom</a></code> | <code>aws-cdk-lib.aws_ecr_assets.DockerCacheOption[]</code> | Cache from options to pass to the `docker build` command. |
|
|
5554
5790
|
| <code><a href="#cdk-nextjs.OptionalDockerImageAssetProps.property.cacheTo">cacheTo</a></code> | <code>aws-cdk-lib.aws_ecr_assets.DockerCacheOption</code> | Cache to options to pass to the `docker build` command. |
|
|
5555
5791
|
| <code><a href="#cdk-nextjs.OptionalDockerImageAssetProps.property.directory">directory</a></code> | <code>string</code> | The directory where the Dockerfile is stored. |
|
|
5792
|
+
| <code><a href="#cdk-nextjs.OptionalDockerImageAssetProps.property.displayName">displayName</a></code> | <code>string</code> | A display name for this asset. |
|
|
5556
5793
|
| <code><a href="#cdk-nextjs.OptionalDockerImageAssetProps.property.exclude">exclude</a></code> | <code>string[]</code> | File paths matching the patterns will be excluded. |
|
|
5557
5794
|
| <code><a href="#cdk-nextjs.OptionalDockerImageAssetProps.property.extraHash">extraHash</a></code> | <code>string</code> | Extra information to encode into the fingerprint (e.g. build instructions and other inputs). |
|
|
5558
5795
|
| <code><a href="#cdk-nextjs.OptionalDockerImageAssetProps.property.file">file</a></code> | <code>string</code> | Path to the Dockerfile (relative to the directory). |
|
|
@@ -5681,6 +5918,35 @@ Any directory inside with a name that matches the CDK output folder (cdk.out by
|
|
|
5681
5918
|
|
|
5682
5919
|
---
|
|
5683
5920
|
|
|
5921
|
+
##### `displayName`<sup>Optional</sup> <a name="displayName" id="cdk-nextjs.OptionalDockerImageAssetProps.property.displayName"></a>
|
|
5922
|
+
|
|
5923
|
+
```typescript
|
|
5924
|
+
public readonly displayName: string;
|
|
5925
|
+
```
|
|
5926
|
+
|
|
5927
|
+
- *Type:* string
|
|
5928
|
+
- *Default:* Stack-relative construct path
|
|
5929
|
+
|
|
5930
|
+
A display name for this asset.
|
|
5931
|
+
|
|
5932
|
+
If supplied, the display name will be used in locations where the asset
|
|
5933
|
+
identifier is printed, like in the CLI progress information. If the same
|
|
5934
|
+
asset is added multiple times, the display name of the first occurrence is
|
|
5935
|
+
used.
|
|
5936
|
+
|
|
5937
|
+
If `assetName` is given, it will also be used as the default `displayName`.
|
|
5938
|
+
Otherwise, the default is the construct path of the ImageAsset construct,
|
|
5939
|
+
with respect to the enclosing stack. If the asset is produced by a
|
|
5940
|
+
construct helper function (such as `lambda.Code.fromAssetImage()`), this
|
|
5941
|
+
will look like `MyFunction/AssetImage`.
|
|
5942
|
+
|
|
5943
|
+
We use the stack-relative construct path so that in the common case where
|
|
5944
|
+
you have multiple stacks with the same asset, we won't show something like
|
|
5945
|
+
`/MyBetaStack/MyFunction/Code` when you are actually deploying to
|
|
5946
|
+
production.
|
|
5947
|
+
|
|
5948
|
+
---
|
|
5949
|
+
|
|
5684
5950
|
##### `exclude`<sup>Optional</sup> <a name="exclude" id="cdk-nextjs.OptionalDockerImageAssetProps.property.exclude"></a>
|
|
5685
5951
|
|
|
5686
5952
|
```typescript
|
|
@@ -8518,12 +8784,13 @@ const optionalNextjsAssetsDeploymentProps: OptionalNextjsAssetsDeploymentProps =
|
|
|
8518
8784
|
| **Name** | **Type** | **Description** |
|
|
8519
8785
|
| --- | --- | --- |
|
|
8520
8786
|
| <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.accessPoint">accessPoint</a></code> | <code>aws-cdk-lib.aws_efs.AccessPoint</code> | *No description.* |
|
|
8787
|
+
| <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.basePath">basePath</a></code> | <code>string</code> | Prefix to the URI path the app will be served at. |
|
|
8788
|
+
| <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.buildId">buildId</a></code> | <code>string</code> | *No description.* |
|
|
8521
8789
|
| <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.buildImageDigest">buildImageDigest</a></code> | <code>string</code> | *No description.* |
|
|
8522
|
-
| <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.
|
|
8523
|
-
| <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.debug">debug</a></code> | <code>boolean</code> | *No description.* |
|
|
8790
|
+
| <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.debug">debug</a></code> | <code>boolean</code> | If true, logs details in custom resource lambda. |
|
|
8524
8791
|
| <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.dockerImageCode">dockerImageCode</a></code> | <code>aws-cdk-lib.aws_lambda.DockerImageCode</code> | *No description.* |
|
|
8525
8792
|
| <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.nextjsType">nextjsType</a></code> | <code><a href="#cdk-nextjs.NextjsType">NextjsType</a></code> | *No description.* |
|
|
8526
|
-
| <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.
|
|
8793
|
+
| <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.relativePathToPackage">relativePathToPackage</a></code> | <code>string</code> | *No description.* |
|
|
8527
8794
|
| <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.staticAssetsBucket">staticAssetsBucket</a></code> | <code>aws-cdk-lib.aws_s3.Bucket</code> | Required for `NextjsType.GlobalFunctions` and `NextjsType.GlobalContainers`. |
|
|
8528
8795
|
| <code><a href="#cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | *No description.* |
|
|
8529
8796
|
|
|
@@ -8539,20 +8806,32 @@ public readonly accessPoint: AccessPoint;
|
|
|
8539
8806
|
|
|
8540
8807
|
---
|
|
8541
8808
|
|
|
8542
|
-
##### `
|
|
8809
|
+
##### `basePath`<sup>Optional</sup> <a name="basePath" id="cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.basePath"></a>
|
|
8543
8810
|
|
|
8544
8811
|
```typescript
|
|
8545
|
-
public readonly
|
|
8812
|
+
public readonly basePath: string;
|
|
8813
|
+
```
|
|
8814
|
+
|
|
8815
|
+
- *Type:* string
|
|
8816
|
+
|
|
8817
|
+
Prefix to the URI path the app will be served at.
|
|
8818
|
+
|
|
8819
|
+
---
|
|
8820
|
+
|
|
8821
|
+
##### `buildId`<sup>Optional</sup> <a name="buildId" id="cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.buildId"></a>
|
|
8822
|
+
|
|
8823
|
+
```typescript
|
|
8824
|
+
public readonly buildId: string;
|
|
8546
8825
|
```
|
|
8547
8826
|
|
|
8548
8827
|
- *Type:* string
|
|
8549
8828
|
|
|
8550
8829
|
---
|
|
8551
8830
|
|
|
8552
|
-
##### `
|
|
8831
|
+
##### `buildImageDigest`<sup>Optional</sup> <a name="buildImageDigest" id="cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.buildImageDigest"></a>
|
|
8553
8832
|
|
|
8554
8833
|
```typescript
|
|
8555
|
-
public readonly
|
|
8834
|
+
public readonly buildImageDigest: string;
|
|
8556
8835
|
```
|
|
8557
8836
|
|
|
8558
8837
|
- *Type:* string
|
|
@@ -8568,6 +8847,8 @@ public readonly debug: boolean;
|
|
|
8568
8847
|
- *Type:* boolean
|
|
8569
8848
|
- *Default:* true
|
|
8570
8849
|
|
|
8850
|
+
If true, logs details in custom resource lambda.
|
|
8851
|
+
|
|
8571
8852
|
---
|
|
8572
8853
|
|
|
8573
8854
|
##### `dockerImageCode`<sup>Optional</sup> <a name="dockerImageCode" id="cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.dockerImageCode"></a>
|
|
@@ -8590,10 +8871,10 @@ public readonly nextjsType: NextjsType;
|
|
|
8590
8871
|
|
|
8591
8872
|
---
|
|
8592
8873
|
|
|
8593
|
-
##### `
|
|
8874
|
+
##### `relativePathToPackage`<sup>Optional</sup> <a name="relativePathToPackage" id="cdk-nextjs.OptionalNextjsAssetsDeploymentProps.property.relativePathToPackage"></a>
|
|
8594
8875
|
|
|
8595
8876
|
```typescript
|
|
8596
|
-
public readonly
|
|
8877
|
+
public readonly relativePathToPackage: string;
|
|
8597
8878
|
```
|
|
8598
8879
|
|
|
8599
8880
|
- *Type:* string
|
|
@@ -8642,7 +8923,7 @@ const optionalNextjsBuildProps: OptionalNextjsBuildProps = { ... }
|
|
|
8642
8923
|
| <code><a href="#cdk-nextjs.OptionalNextjsBuildProps.property.buildContext">buildContext</a></code> | <code>string</code> | *No description.* |
|
|
8643
8924
|
| <code><a href="#cdk-nextjs.OptionalNextjsBuildProps.property.builderImageProps">builderImageProps</a></code> | <code><a href="#cdk-nextjs.BuilderImageProps">BuilderImageProps</a></code> | *No description.* |
|
|
8644
8925
|
| <code><a href="#cdk-nextjs.OptionalNextjsBuildProps.property.nextjsType">nextjsType</a></code> | <code><a href="#cdk-nextjs.NextjsType">NextjsType</a></code> | *No description.* |
|
|
8645
|
-
| <code><a href="#cdk-nextjs.OptionalNextjsBuildProps.property.
|
|
8926
|
+
| <code><a href="#cdk-nextjs.OptionalNextjsBuildProps.property.relativePathToPackage">relativePathToPackage</a></code> | <code>string</code> | *No description.* |
|
|
8646
8927
|
|
|
8647
8928
|
---
|
|
8648
8929
|
|
|
@@ -8686,10 +8967,10 @@ public readonly nextjsType: NextjsType;
|
|
|
8686
8967
|
|
|
8687
8968
|
---
|
|
8688
8969
|
|
|
8689
|
-
##### `
|
|
8970
|
+
##### `relativePathToPackage`<sup>Optional</sup> <a name="relativePathToPackage" id="cdk-nextjs.OptionalNextjsBuildProps.property.relativePathToPackage"></a>
|
|
8690
8971
|
|
|
8691
8972
|
```typescript
|
|
8692
|
-
public readonly
|
|
8973
|
+
public readonly relativePathToPackage: string;
|
|
8693
8974
|
```
|
|
8694
8975
|
|
|
8695
8976
|
- *Type:* string
|
|
@@ -8713,7 +8994,7 @@ const optionalNextjsContainersProps: OptionalNextjsContainersProps = { ... }
|
|
|
8713
8994
|
| **Name** | **Type** | **Description** |
|
|
8714
8995
|
| --- | --- | --- |
|
|
8715
8996
|
| <code><a href="#cdk-nextjs.OptionalNextjsContainersProps.property.accessPoint">accessPoint</a></code> | <code>aws-cdk-lib.aws_efs.AccessPoint</code> | *No description.* |
|
|
8716
|
-
| <code><a href="#cdk-nextjs.OptionalNextjsContainersProps.property.
|
|
8997
|
+
| <code><a href="#cdk-nextjs.OptionalNextjsContainersProps.property.buildId">buildId</a></code> | <code>string</code> | *No description.* |
|
|
8717
8998
|
| <code><a href="#cdk-nextjs.OptionalNextjsContainersProps.property.dockerImageAsset">dockerImageAsset</a></code> | <code>aws-cdk-lib.aws_ecr_assets.DockerImageAsset</code> | *No description.* |
|
|
8718
8999
|
| <code><a href="#cdk-nextjs.OptionalNextjsContainersProps.property.fileSystem">fileSystem</a></code> | <code>aws-cdk-lib.aws_efs.FileSystem</code> | *No description.* |
|
|
8719
9000
|
| <code><a href="#cdk-nextjs.OptionalNextjsContainersProps.property.healthCheckPath">healthCheckPath</a></code> | <code>string</code> | *No description.* |
|
|
@@ -8733,10 +9014,10 @@ public readonly accessPoint: AccessPoint;
|
|
|
8733
9014
|
|
|
8734
9015
|
---
|
|
8735
9016
|
|
|
8736
|
-
##### `
|
|
9017
|
+
##### `buildId`<sup>Optional</sup> <a name="buildId" id="cdk-nextjs.OptionalNextjsContainersProps.property.buildId"></a>
|
|
8737
9018
|
|
|
8738
9019
|
```typescript
|
|
8739
|
-
public readonly
|
|
9020
|
+
public readonly buildId: string;
|
|
8740
9021
|
```
|
|
8741
9022
|
|
|
8742
9023
|
- *Type:* string
|
|
@@ -8952,27 +9233,77 @@ public readonly vpc: IVpc;
|
|
|
8952
9233
|
|
|
8953
9234
|
---
|
|
8954
9235
|
|
|
8955
|
-
###
|
|
9236
|
+
### OptionalNextjsPostDeployProps <a name="OptionalNextjsPostDeployProps" id="cdk-nextjs.OptionalNextjsPostDeployProps"></a>
|
|
8956
9237
|
|
|
8957
|
-
|
|
9238
|
+
OptionalNextjsPostDeployProps.
|
|
8958
9239
|
|
|
8959
|
-
#### Initializer <a name="Initializer" id="cdk-nextjs.
|
|
9240
|
+
#### Initializer <a name="Initializer" id="cdk-nextjs.OptionalNextjsPostDeployProps.Initializer"></a>
|
|
8960
9241
|
|
|
8961
9242
|
```typescript
|
|
8962
|
-
import {
|
|
9243
|
+
import { OptionalNextjsPostDeployProps } from 'cdk-nextjs'
|
|
8963
9244
|
|
|
8964
|
-
const
|
|
9245
|
+
const optionalNextjsPostDeployProps: OptionalNextjsPostDeployProps = { ... }
|
|
8965
9246
|
```
|
|
8966
9247
|
|
|
8967
9248
|
#### Properties <a name="Properties" id="Properties"></a>
|
|
8968
9249
|
|
|
8969
9250
|
| **Name** | **Type** | **Description** |
|
|
8970
9251
|
| --- | --- | --- |
|
|
8971
|
-
| <code><a href="#cdk-nextjs.
|
|
9252
|
+
| <code><a href="#cdk-nextjs.OptionalNextjsPostDeployProps.property.accessPoint">accessPoint</a></code> | <code>aws-cdk-lib.aws_efs.AccessPoint</code> | *No description.* |
|
|
9253
|
+
| <code><a href="#cdk-nextjs.OptionalNextjsPostDeployProps.property.buildId">buildId</a></code> | <code>string</code> | *No description.* |
|
|
9254
|
+
| <code><a href="#cdk-nextjs.OptionalNextjsPostDeployProps.property.buildImageDigest">buildImageDigest</a></code> | <code>string</code> | *No description.* |
|
|
9255
|
+
| <code><a href="#cdk-nextjs.OptionalNextjsPostDeployProps.property.debug">debug</a></code> | <code>boolean</code> | If true, logs details in custom resource lambda. |
|
|
9256
|
+
| <code><a href="#cdk-nextjs.OptionalNextjsPostDeployProps.property.distribution">distribution</a></code> | <code>aws-cdk-lib.aws_cloudfront.IDistribution</code> | CloudFront Distribution to invalidate. |
|
|
9257
|
+
| <code><a href="#cdk-nextjs.OptionalNextjsPostDeployProps.property.relativePathToPackage">relativePathToPackage</a></code> | <code>string</code> | *No description.* |
|
|
9258
|
+
| <code><a href="#cdk-nextjs.OptionalNextjsPostDeployProps.property.staticAssetsBucket">staticAssetsBucket</a></code> | <code>aws-cdk-lib.aws_s3.Bucket</code> | Required for `NextjsType.GlobalFunctions` and `NextjsType.GlobalContainers`. |
|
|
9259
|
+
| <code><a href="#cdk-nextjs.OptionalNextjsPostDeployProps.property.vpc">vpc</a></code> | <code>aws-cdk-lib.aws_ec2.IVpc</code> | *No description.* |
|
|
9260
|
+
|
|
9261
|
+
---
|
|
9262
|
+
|
|
9263
|
+
##### `accessPoint`<sup>Optional</sup> <a name="accessPoint" id="cdk-nextjs.OptionalNextjsPostDeployProps.property.accessPoint"></a>
|
|
9264
|
+
|
|
9265
|
+
```typescript
|
|
9266
|
+
public readonly accessPoint: AccessPoint;
|
|
9267
|
+
```
|
|
9268
|
+
|
|
9269
|
+
- *Type:* aws-cdk-lib.aws_efs.AccessPoint
|
|
9270
|
+
|
|
9271
|
+
---
|
|
9272
|
+
|
|
9273
|
+
##### `buildId`<sup>Optional</sup> <a name="buildId" id="cdk-nextjs.OptionalNextjsPostDeployProps.property.buildId"></a>
|
|
9274
|
+
|
|
9275
|
+
```typescript
|
|
9276
|
+
public readonly buildId: string;
|
|
9277
|
+
```
|
|
9278
|
+
|
|
9279
|
+
- *Type:* string
|
|
9280
|
+
|
|
9281
|
+
---
|
|
9282
|
+
|
|
9283
|
+
##### `buildImageDigest`<sup>Optional</sup> <a name="buildImageDigest" id="cdk-nextjs.OptionalNextjsPostDeployProps.property.buildImageDigest"></a>
|
|
9284
|
+
|
|
9285
|
+
```typescript
|
|
9286
|
+
public readonly buildImageDigest: string;
|
|
9287
|
+
```
|
|
9288
|
+
|
|
9289
|
+
- *Type:* string
|
|
9290
|
+
|
|
9291
|
+
---
|
|
9292
|
+
|
|
9293
|
+
##### `debug`<sup>Optional</sup> <a name="debug" id="cdk-nextjs.OptionalNextjsPostDeployProps.property.debug"></a>
|
|
9294
|
+
|
|
9295
|
+
```typescript
|
|
9296
|
+
public readonly debug: boolean;
|
|
9297
|
+
```
|
|
9298
|
+
|
|
9299
|
+
- *Type:* boolean
|
|
9300
|
+
- *Default:* true
|
|
9301
|
+
|
|
9302
|
+
If true, logs details in custom resource lambda.
|
|
8972
9303
|
|
|
8973
9304
|
---
|
|
8974
9305
|
|
|
8975
|
-
##### `distribution`<sup>Optional</sup> <a name="distribution" id="cdk-nextjs.
|
|
9306
|
+
##### `distribution`<sup>Optional</sup> <a name="distribution" id="cdk-nextjs.OptionalNextjsPostDeployProps.property.distribution"></a>
|
|
8976
9307
|
|
|
8977
9308
|
```typescript
|
|
8978
9309
|
public readonly distribution: IDistribution;
|
|
@@ -8984,6 +9315,38 @@ CloudFront Distribution to invalidate.
|
|
|
8984
9315
|
|
|
8985
9316
|
---
|
|
8986
9317
|
|
|
9318
|
+
##### `relativePathToPackage`<sup>Optional</sup> <a name="relativePathToPackage" id="cdk-nextjs.OptionalNextjsPostDeployProps.property.relativePathToPackage"></a>
|
|
9319
|
+
|
|
9320
|
+
```typescript
|
|
9321
|
+
public readonly relativePathToPackage: string;
|
|
9322
|
+
```
|
|
9323
|
+
|
|
9324
|
+
- *Type:* string
|
|
9325
|
+
|
|
9326
|
+
---
|
|
9327
|
+
|
|
9328
|
+
##### `staticAssetsBucket`<sup>Optional</sup> <a name="staticAssetsBucket" id="cdk-nextjs.OptionalNextjsPostDeployProps.property.staticAssetsBucket"></a>
|
|
9329
|
+
|
|
9330
|
+
```typescript
|
|
9331
|
+
public readonly staticAssetsBucket: Bucket;
|
|
9332
|
+
```
|
|
9333
|
+
|
|
9334
|
+
- *Type:* aws-cdk-lib.aws_s3.Bucket
|
|
9335
|
+
|
|
9336
|
+
Required for `NextjsType.GlobalFunctions` and `NextjsType.GlobalContainers`.
|
|
9337
|
+
|
|
9338
|
+
---
|
|
9339
|
+
|
|
9340
|
+
##### `vpc`<sup>Optional</sup> <a name="vpc" id="cdk-nextjs.OptionalNextjsPostDeployProps.property.vpc"></a>
|
|
9341
|
+
|
|
9342
|
+
```typescript
|
|
9343
|
+
public readonly vpc: IVpc;
|
|
9344
|
+
```
|
|
9345
|
+
|
|
9346
|
+
- *Type:* aws-cdk-lib.aws_ec2.IVpc
|
|
9347
|
+
|
|
9348
|
+
---
|
|
9349
|
+
|
|
8987
9350
|
### OptionalNextjsVpcProps <a name="OptionalNextjsVpcProps" id="cdk-nextjs.OptionalNextjsVpcProps"></a>
|
|
8988
9351
|
|
|
8989
9352
|
OptionalNextjsVpcProps.
|
|
@@ -9027,6 +9390,91 @@ Bring your own VPC.
|
|
|
9027
9390
|
|
|
9028
9391
|
---
|
|
9029
9392
|
|
|
9393
|
+
### OptionalPostDeployCustomResourceProperties <a name="OptionalPostDeployCustomResourceProperties" id="cdk-nextjs.OptionalPostDeployCustomResourceProperties"></a>
|
|
9394
|
+
|
|
9395
|
+
OptionalPostDeployCustomResourceProperties.
|
|
9396
|
+
|
|
9397
|
+
#### Initializer <a name="Initializer" id="cdk-nextjs.OptionalPostDeployCustomResourceProperties.Initializer"></a>
|
|
9398
|
+
|
|
9399
|
+
```typescript
|
|
9400
|
+
import { OptionalPostDeployCustomResourceProperties } from 'cdk-nextjs'
|
|
9401
|
+
|
|
9402
|
+
const optionalPostDeployCustomResourceProperties: OptionalPostDeployCustomResourceProperties = { ... }
|
|
9403
|
+
```
|
|
9404
|
+
|
|
9405
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
9406
|
+
|
|
9407
|
+
| **Name** | **Type** | **Description** |
|
|
9408
|
+
| --- | --- | --- |
|
|
9409
|
+
| <code><a href="#cdk-nextjs.OptionalPostDeployCustomResourceProperties.property.buildId">buildId</a></code> | <code>string</code> | Build ID of current deployment. |
|
|
9410
|
+
| <code><a href="#cdk-nextjs.OptionalPostDeployCustomResourceProperties.property.buildImageDigest">buildImageDigest</a></code> | <code>string</code> | *No description.* |
|
|
9411
|
+
| <code><a href="#cdk-nextjs.OptionalPostDeployCustomResourceProperties.property.createInvalidationCommandInput">createInvalidationCommandInput</a></code> | <code>{[ key: string ]: any}</code> | *No description.* |
|
|
9412
|
+
| <code><a href="#cdk-nextjs.OptionalPostDeployCustomResourceProperties.property.msTtl">msTtl</a></code> | <code>string</code> | Time to live in milliseconds. |
|
|
9413
|
+
| <code><a href="#cdk-nextjs.OptionalPostDeployCustomResourceProperties.property.staticAssetsBucketName">staticAssetsBucketName</a></code> | <code>string</code> | *No description.* |
|
|
9414
|
+
|
|
9415
|
+
---
|
|
9416
|
+
|
|
9417
|
+
##### `buildId`<sup>Optional</sup> <a name="buildId" id="cdk-nextjs.OptionalPostDeployCustomResourceProperties.property.buildId"></a>
|
|
9418
|
+
|
|
9419
|
+
```typescript
|
|
9420
|
+
public readonly buildId: string;
|
|
9421
|
+
```
|
|
9422
|
+
|
|
9423
|
+
- *Type:* string
|
|
9424
|
+
|
|
9425
|
+
Build ID of current deployment.
|
|
9426
|
+
|
|
9427
|
+
Used to prune FileSystem of directories
|
|
9428
|
+
with old build ids and prune S3 based on metadat and `msTtl`
|
|
9429
|
+
|
|
9430
|
+
---
|
|
9431
|
+
|
|
9432
|
+
##### `buildImageDigest`<sup>Optional</sup> <a name="buildImageDigest" id="cdk-nextjs.OptionalPostDeployCustomResourceProperties.property.buildImageDigest"></a>
|
|
9433
|
+
|
|
9434
|
+
```typescript
|
|
9435
|
+
public readonly buildImageDigest: string;
|
|
9436
|
+
```
|
|
9437
|
+
|
|
9438
|
+
- *Type:* string
|
|
9439
|
+
|
|
9440
|
+
---
|
|
9441
|
+
|
|
9442
|
+
##### `createInvalidationCommandInput`<sup>Optional</sup> <a name="createInvalidationCommandInput" id="cdk-nextjs.OptionalPostDeployCustomResourceProperties.property.createInvalidationCommandInput"></a>
|
|
9443
|
+
|
|
9444
|
+
```typescript
|
|
9445
|
+
public readonly createInvalidationCommandInput: {[ key: string ]: any};
|
|
9446
|
+
```
|
|
9447
|
+
|
|
9448
|
+
- *Type:* {[ key: string ]: any}
|
|
9449
|
+
- *Default:* { distributionId: this.props.distribution?.distributionId, invalidationBatch: { callerReference: new Date().toISOString(), paths: { quantity: 1, items: ["/*"], // invalidate all paths }, }, }
|
|
9450
|
+
|
|
9451
|
+
---
|
|
9452
|
+
|
|
9453
|
+
##### `msTtl`<sup>Optional</sup> <a name="msTtl" id="cdk-nextjs.OptionalPostDeployCustomResourceProperties.property.msTtl"></a>
|
|
9454
|
+
|
|
9455
|
+
```typescript
|
|
9456
|
+
public readonly msTtl: string;
|
|
9457
|
+
```
|
|
9458
|
+
|
|
9459
|
+
- *Type:* string
|
|
9460
|
+
- *Default:* (1000 * 60 * 60 * 24 * 30).toString()
|
|
9461
|
+
|
|
9462
|
+
Time to live in milliseconds.
|
|
9463
|
+
|
|
9464
|
+
Must be string because of CloudFormation Custom Resource limitation
|
|
9465
|
+
|
|
9466
|
+
---
|
|
9467
|
+
|
|
9468
|
+
##### `staticAssetsBucketName`<sup>Optional</sup> <a name="staticAssetsBucketName" id="cdk-nextjs.OptionalPostDeployCustomResourceProperties.property.staticAssetsBucketName"></a>
|
|
9469
|
+
|
|
9470
|
+
```typescript
|
|
9471
|
+
public readonly staticAssetsBucketName: string;
|
|
9472
|
+
```
|
|
9473
|
+
|
|
9474
|
+
- *Type:* string
|
|
9475
|
+
|
|
9476
|
+
---
|
|
9477
|
+
|
|
9030
9478
|
### OptionalS3OriginBucketWithOACProps <a name="OptionalS3OriginBucketWithOACProps" id="cdk-nextjs.OptionalS3OriginBucketWithOACProps"></a>
|
|
9031
9479
|
|
|
9032
9480
|
OptionalS3OriginBucketWithOACProps.
|
|
@@ -9618,6 +10066,93 @@ Where to propagate VPN routes.
|
|
|
9618
10066
|
|
|
9619
10067
|
---
|
|
9620
10068
|
|
|
10069
|
+
### PostDeployCustomResourceProperties <a name="PostDeployCustomResourceProperties" id="cdk-nextjs.PostDeployCustomResourceProperties"></a>
|
|
10070
|
+
|
|
10071
|
+
#### Initializer <a name="Initializer" id="cdk-nextjs.PostDeployCustomResourceProperties.Initializer"></a>
|
|
10072
|
+
|
|
10073
|
+
```typescript
|
|
10074
|
+
import { PostDeployCustomResourceProperties } from 'cdk-nextjs'
|
|
10075
|
+
|
|
10076
|
+
const postDeployCustomResourceProperties: PostDeployCustomResourceProperties = { ... }
|
|
10077
|
+
```
|
|
10078
|
+
|
|
10079
|
+
#### Properties <a name="Properties" id="Properties"></a>
|
|
10080
|
+
|
|
10081
|
+
| **Name** | **Type** | **Description** |
|
|
10082
|
+
| --- | --- | --- |
|
|
10083
|
+
| <code><a href="#cdk-nextjs.PostDeployCustomResourceProperties.property.buildId">buildId</a></code> | <code>string</code> | Build ID of current deployment. |
|
|
10084
|
+
| <code><a href="#cdk-nextjs.PostDeployCustomResourceProperties.property.buildImageDigest">buildImageDigest</a></code> | <code>string</code> | *No description.* |
|
|
10085
|
+
| <code><a href="#cdk-nextjs.PostDeployCustomResourceProperties.property.msTtl">msTtl</a></code> | <code>string</code> | Time to live in milliseconds. |
|
|
10086
|
+
| <code><a href="#cdk-nextjs.PostDeployCustomResourceProperties.property.createInvalidationCommandInput">createInvalidationCommandInput</a></code> | <code>{[ key: string ]: any}</code> | *No description.* |
|
|
10087
|
+
| <code><a href="#cdk-nextjs.PostDeployCustomResourceProperties.property.staticAssetsBucketName">staticAssetsBucketName</a></code> | <code>string</code> | *No description.* |
|
|
10088
|
+
|
|
10089
|
+
---
|
|
10090
|
+
|
|
10091
|
+
##### `buildId`<sup>Required</sup> <a name="buildId" id="cdk-nextjs.PostDeployCustomResourceProperties.property.buildId"></a>
|
|
10092
|
+
|
|
10093
|
+
```typescript
|
|
10094
|
+
public readonly buildId: string;
|
|
10095
|
+
```
|
|
10096
|
+
|
|
10097
|
+
- *Type:* string
|
|
10098
|
+
|
|
10099
|
+
Build ID of current deployment.
|
|
10100
|
+
|
|
10101
|
+
Used to prune FileSystem of directories
|
|
10102
|
+
with old build ids and prune S3 based on metadat and `msTtl`
|
|
10103
|
+
|
|
10104
|
+
---
|
|
10105
|
+
|
|
10106
|
+
##### `buildImageDigest`<sup>Required</sup> <a name="buildImageDigest" id="cdk-nextjs.PostDeployCustomResourceProperties.property.buildImageDigest"></a>
|
|
10107
|
+
|
|
10108
|
+
```typescript
|
|
10109
|
+
public readonly buildImageDigest: string;
|
|
10110
|
+
```
|
|
10111
|
+
|
|
10112
|
+
- *Type:* string
|
|
10113
|
+
|
|
10114
|
+
> [{@link NextjsBuild.buildImageDigest }]({@link NextjsBuild.buildImageDigest })
|
|
10115
|
+
|
|
10116
|
+
---
|
|
10117
|
+
|
|
10118
|
+
##### `msTtl`<sup>Required</sup> <a name="msTtl" id="cdk-nextjs.PostDeployCustomResourceProperties.property.msTtl"></a>
|
|
10119
|
+
|
|
10120
|
+
```typescript
|
|
10121
|
+
public readonly msTtl: string;
|
|
10122
|
+
```
|
|
10123
|
+
|
|
10124
|
+
- *Type:* string
|
|
10125
|
+
- *Default:* (1000 * 60 * 60 * 24 * 30).toString()
|
|
10126
|
+
|
|
10127
|
+
Time to live in milliseconds.
|
|
10128
|
+
|
|
10129
|
+
Must be string because of CloudFormation Custom Resource limitation
|
|
10130
|
+
|
|
10131
|
+
---
|
|
10132
|
+
|
|
10133
|
+
##### `createInvalidationCommandInput`<sup>Optional</sup> <a name="createInvalidationCommandInput" id="cdk-nextjs.PostDeployCustomResourceProperties.property.createInvalidationCommandInput"></a>
|
|
10134
|
+
|
|
10135
|
+
```typescript
|
|
10136
|
+
public readonly createInvalidationCommandInput: {[ key: string ]: any};
|
|
10137
|
+
```
|
|
10138
|
+
|
|
10139
|
+
- *Type:* {[ key: string ]: any}
|
|
10140
|
+
- *Default:* { distributionId: this.props.distribution?.distributionId, invalidationBatch: { callerReference: new Date().toISOString(), paths: { quantity: 1, items: ["/*"], // invalidate all paths }, }, }
|
|
10141
|
+
|
|
10142
|
+
> [https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/CreateInvalidationCommand/](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cloudfront/command/CreateInvalidationCommand/)
|
|
10143
|
+
|
|
10144
|
+
---
|
|
10145
|
+
|
|
10146
|
+
##### `staticAssetsBucketName`<sup>Optional</sup> <a name="staticAssetsBucketName" id="cdk-nextjs.PostDeployCustomResourceProperties.property.staticAssetsBucketName"></a>
|
|
10147
|
+
|
|
10148
|
+
```typescript
|
|
10149
|
+
public readonly staticAssetsBucketName: string;
|
|
10150
|
+
```
|
|
10151
|
+
|
|
10152
|
+
- *Type:* string
|
|
10153
|
+
|
|
10154
|
+
---
|
|
10155
|
+
|
|
9621
10156
|
### PublicDirEntry <a name="PublicDirEntry" id="cdk-nextjs.PublicDirEntry"></a>
|
|
9622
10157
|
|
|
9623
10158
|
#### Initializer <a name="Initializer" id="cdk-nextjs.PublicDirEntry.Initializer"></a>
|