Skip to content

Commit 340bc85

Browse files
authored
docs: add output standalone in docker deployment section (#9738)
Adds details about `output: 'standalone'` to Docker deployment section. This is required in order for Next.js to be dockerized. ``` const nextConfig = { output: 'standalone', } ```
1 parent 9bffa09 commit 340bc85

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

docs/production/deployment.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,19 @@ Follow the docs to configure any one of these storage providers. For local devel
160160
This is an example of a multi-stage docker build of Payload for production. Ensure you are setting your environment
161161
variables on deployment, like `PAYLOAD_SECRET`, `PAYLOAD_CONFIG_PATH`, and `DATABASE_URI` if needed.
162162

163+
In your Next.js config, set the `output` property `standalone`.
164+
165+
```js
166+
// next.config.js
167+
const nextConfig = {
168+
output: 'standalone',
169+
}
170+
```
171+
172+
Dockerfile
173+
163174
```dockerfile
175+
# Dockerfile
164176
# From https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile
165177

166178
FROM node:18-alpine AS base

0 commit comments

Comments
 (0)