#Deploying Next.js Docker Container With `NEXT START`

11 messages · Page 1 of 1 (latest)

shrewd flare
#

I have deployed a Next.js app to AWS using the official Docker example with the following config file

As advised in the documentation in order to use Middleware self-hosted I need to use next start

Can you please advise me what Docker config is necessary for that? Also in your opinion is there any performance price for that?

crisp bayBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

shrewd flare
#

Deploying Next.js Docker Container With NEXT START

vagrant blaze
shrewd flare
# vagrant blaze middleware also work with the docker example

Oh ok. Didn't catch that. Thank you!

Does this apply for other Next.js features as well? For example it says in the docs that Image Optimization is supported with zero configuration only when deploying using next start. If not are you aware of any Docker setups with next start I can check?

And final question sorry! If middleware also work with the docker example that would mean I don't need to deploy using next start if I want to implement a custom CSP with their middlware.js setup ?

vagrant blaze
#

the docker example using the standalone output which also run on a node server

shrewd flare
vagrant blaze
#

which doesn't contain the node_module folder

shrewd flare