Deploy to Netlify
Netlify tl;dr Deploy
If you simply want to experience the Netlify deployment process without a database and/or adding custom code, you can do the following:
- create a new redwood project:
yarn create redwood-app ./netlify-deploy
- after your "netlify-deploy" project installation is complete, init git, commit, and add it as a new repo to GitHub, BitBucket, or GitLab
- run the command
yarn rw setup deploy netlifyand commit and push changes
- use the Netlify Quick Start to deploy
While you may be tempted to use the Netlify CLI commands to build and deploy your project directly from you local project directory, doing so will lead to errors when deploying and/or when running functions. I.e. errors in the function needed for the GraphQL server, but also other serverless functions.
The main reason for this is that these Netlify CLI commands simply build and deploy -- they build your project locally and then push the dist folder. That means that when building a RedwoodJS project, the Prisma client is generated with binaries matching the operating system at build time -- and not the OS compatible with running functions on Netlify. Your Prisma client engine may be
darwin for OSX or
windows for Windows, but it needs to be
rhel-openssl-1.1.x. If the client is incompatible, your functions will fail.
Therefore, please follow the Tutorial Deployment section to sync your GitHub (or other compatible source control service) repository with Netlify andalllow their build and deploy system to manage deployments.
Netlify Complete Deploy Walkthrough
For the complete deployment process on Netlify, see the Tutorial Deployment section.