Skip to content

Help with build args #37

Answered by coltenkrauter
corbinabeebe asked this question in Q&A
Discussion options

You must be logged in to vote

The buildContext should point to the root directory of your Next.js app (where package.json and package-lock.json are located).

This is the base directory Docker uses to build your application. In the case of NextjsGlobalFunctions, the buildContext ensures Docker can locate the app's source files for packaging and deployment.


Examples

Monorepo Example

project/  
├── infra/            # Infrastructure code  
│   ├── deploy-app.ts # CDK file to deploy the app  
├── app/              # Next.js app  
│   ├── package.json  
│   ├── package-lock.json  
│   ├── Dockerfile  

deploy-app.ts:

// ESM example
import { Stack, StackProps } from 'aws-cdk-lib'
import { Construct } from 'constructs'
import 

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@coltenkrauter
Comment options

@corbinabeebe
Comment options

@coltenkrauter
Comment options

Comment options

You must be logged in to vote
1 reply
@corbinabeebe
Comment options

Answer selected by corbinabeebe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants