Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
thijsdaniels authored Jun 25, 2024
1 parent 213960a commit 20cb853
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions packages/cdk-next-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,37 @@ The NextApp CDK construct deploys a standalone Next.js build to a load balanced

## Example

### Standard Repository

For a non-mnonorepo build, simply provide the path to the directory that contains your Dockerfile.

```ts
new NextApp(this, "NextApp", {
path: "../next",
});
```

### Monorepo

For monorepo builds, set the build context to the root of your monorepo, and provide the path to your Next.js module's Dockerfile.

```ts
new NextApp(this, "NextApp", {
path: "../../",
file: "apps/next/Dockerfile",
});
```

### Scaling

The NextApp is based on the [DockerCluster](https://github.com/codedazur/toolkit/tree/main/packages/cdk-docker-cluster) construct and supports all of its features for horizontal and vertical scaling.

```ts
new NextApp(this, "Next", {
path: "../next", // Must contain a Dockerfile.
new NextApp(this, "NextApp", {
...
cpu: 1024,
memory: 4096,
tasks: { min: 1, max: 10 },
});
```

Expand Down

0 comments on commit 20cb853

Please sign in to comment.