Deploy Nextjs in GCP using serverless in a proper way #14353
Unanswered
rafinskipg
asked this question in
Help
Replies: 1 comment 3 replies
-
I'm talking from the top of my head but basically you have to configure your Next.js file as below: module.exports = {
[...]
assetPrefix: "https://<your-cdn-url>/",
target: "serverless",
[...]
} Then, you have to run the commands below in your Dockerfile:
It's not as straightforward as running |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello. I need some help defining a plan to deploy correctly in google cloud platform.
The documentation for deployments encourages the use of Vercel. But our client can not approve the use of multi-cloud platforms because of security reasons. We are forced to deploy on google cloud platform.
Is there any way to deploy all the NextJS functions as serverless? And, what other nuances are important in the deployments?
Our initial idea is this one:
I have seen this package that helps to deploy in AWS (but not for google): https://www.npmjs.com/package/serverless-nextjs-plugin
Next has documentation for target serverless but i have no idea what i have to do with it. https://nextjs.org/docs/api-reference/next.config.js/build-target#serverless-target
I am not a devops, if there is anybody who can guide me (and probably other people who need this) to solve this approach, that would be great.
Basically we need to be able to :
Thanks
Beta Was this translation helpful? Give feedback.
All reactions