Deploy Next 13 app using AWS codebuild, code deploy, code Pipeline
Unanswered
Oak Titmouse posted this in #help-forum
Oak TitmouseOP
I am trying to deploy Next 13 application using AWS code build and code pipeline. I have set up code build to take code from GitHub install node modules and create a build and take the output in .next folder and upload it to s3 Now my question is after downloading the code from s3 and downloading it on the ec2 server how can i run the .next to start the project. Any help would be appreciated.
1 Reply
I think you should use
https://nextjs.org/docs/app/api-reference/next-config-js/output#automatically-copying-traced-files
standalone
output and it will build a folder at .next/standalone
, then you upload it to your server and use node server.js
to start ithttps://nextjs.org/docs/app/api-reference/next-config-js/output#automatically-copying-traced-files