From 340bc85560c53f1635de4a8e8f0dc1076e954cf8 Mon Sep 17 00:00:00 2001 From: Elliot DeNolf Date: Wed, 4 Dec 2024 09:57:02 -0500 Subject: [PATCH] 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', } ``` --- docs/production/deployment.mdx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/production/deployment.mdx b/docs/production/deployment.mdx index 6f128433015..df4ce8e8107 100644 --- a/docs/production/deployment.mdx +++ b/docs/production/deployment.mdx @@ -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