Skip to content

Commit

Permalink
docs: add output standalone in docker deployment section (#9738)
Browse files Browse the repository at this point in the history
Adds details about `output: 'standalone'` to Docker deployment section.
This is required in order for Next.js to be dockerized.

```
const nextConfig = {
  output: 'standalone',
}
```
  • Loading branch information
denolfe authored Dec 4, 2024
1 parent 9bffa09 commit 340bc85
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/production/deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,19 @@ Follow the docs to configure any one of these storage providers. For local devel
This is an example of a multi-stage docker build of Payload for production. Ensure you are setting your environment
variables on deployment, like `PAYLOAD_SECRET`, `PAYLOAD_CONFIG_PATH`, and `DATABASE_URI` if needed.

In your Next.js config, set the `output` property `standalone`.

```js
// next.config.js
const nextConfig = {
output: 'standalone',
}
```

Dockerfile

```dockerfile
# Dockerfile
# From https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile

FROM node:18-alpine AS base
Expand Down

0 comments on commit 340bc85

Please sign in to comment.