stormy-gold
stormy-gold13mo ago

Production Guide

Hello everyone, I'm looking for a production deployment guide, basically about how to build refine, recommended servers to host it and any other recommendations for production. Appreciate any pointers.
2 Replies
kapa.ai
kapa.ai13mo ago
Hi @rmon. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Sure, I can guide you through the process of deploying a Refine application based on the information provided in the extracts. Firstly, to create a production build of your Refine application, you can use the following command:
npm run refine build
npm run refine build
This command is equivalent to next build and you can refer to the Remix documentation (https://remix.run/docs/en/v1/other-api/dev) for detailed usage. Once you have your build ready, you can deploy it to a hosting provider. The extracts mention two hosting providers: Vercel (https://vercel.com) and Render (https://render.com). For deploying on Vercel, you need to: 1. Push your code to a GitHub repository (https://github.com/new). 2. Create a Vercel account (https://vercel.com/signup) if you do not have one. 3. Select "Import from Git" in Vercel, which will let you set up the project from the GitHub repository that you just pushed. 4. Provide the environmental keys, the same way you did in the local instance of the application. 5. Click on "Deploy". The deployment process is fully automatic and once everything is completed, you will receive a live link to your deployed project. For deploying on Render, you need to: 1. Change the database provider to PostgreSQL in your schema.prisma file. 2. Delete the db/migrations folder so there is no previous migration history and no .lock file for the database type. 3. Create a new file render.yaml in your project root and include the necessary configuration settings. 4. Push your code to a GitHub repository (https://github.com/new). 5. Follow the steps provided by Render to deploy your application. Please note that these are general steps and you might need to adjust them based on your specific application and hosting provider. Always refer to the official documentation of the hosting provider for the most accurate information. Sources: - Refine CLI Documentation (https://refine.dev/docs/packages/documentation/cli) - Refine Blog: 5 Top Free React Hosting Platforms (https://refine.dev/blog/5-top-free-react-hosting-platforms) - Refine Blog: Refine vs Blitz.js (https://refine.dev/blog/react-admin-frameworks-refine-vs-blitz-js) - Refine Blog: Refine vs RedwoodJS (https://refine.dev/blog/refine-vs-redwood-js) - Refine Blog: How to Become A Production Hero as Developer with refine in 2022 (https://refine.dev/blog/how-to-become-a-production-hero-refine-2022) ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai13mo ago
<@1127525379062644756> kapa.ai is still learning and improving, please let us how it did by reacting below