Next.js Discord

Discord Forum

Deploy Next 13 app using AWS codebuild, code deploy, code Pipeline

Unanswered
Oak Titmouse posted this in #help-forum
Open in Discord
Avatar
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

Avatar
Ray
I think you should use 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 it
https://nextjs.org/docs/app/api-reference/next-config-js/output#automatically-copying-traced-files