render_com.mdx 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. ---
  2. title: 'Render.com'
  3. description: 'Deploy your RAG application to render.com platform'
  4. ---
  5. Embedchain has a nice and simple abstraction on top of the [render.com](https://render.com/) tools to let developers deploy RAG application to render.com platform seamlessly.
  6. Follow the instructions given below to deploy your first application quickly:
  7. ## Step-1: Install `render` command line
  8. <CodeGroup>
  9. ```bash OSX
  10. brew tap render-oss/render
  11. brew install render
  12. ```
  13. ```bash Linux
  14. # Make sure you have deno installed -> https://docs.render.com/docs/cli#from-source-unsupported-operating-systems
  15. git clone https://github.com/render-oss/render-cli
  16. cd render-cli
  17. make deps
  18. deno task run
  19. deno compile
  20. ```
  21. ```bash Windows
  22. choco install rendercli
  23. ```
  24. </CodeGroup>
  25. In case you run into issues, refer to official [render.com docs](https://docs.render.com/docs/cli).
  26. ## Step-2 Create RAG application:
  27. We provide a command line utility called `ec` in embedchain that inherits the template for `render.com` platform and help you deploy the app. Follow the instructions to create a render.com app using the template provided:
  28. ```bash Create application
  29. pip install embedchain
  30. mkdir my-rag-app
  31. ec create --template=render.com
  32. ```
  33. This `create` command will open a browser window and ask you to login to your render.com account and will generate a directory structure like this:
  34. ```bash
  35. ├── app.py
  36. ├── .env
  37. ├── render.yaml
  38. ├── embedchain.json
  39. └── requirements.txt
  40. ```
  41. Feel free to edit the files as required.
  42. - `app.py`: Contains API app code
  43. - `.env`: Contains environment variables for production
  44. - `render.yaml`: Contains render.com specific configuration for deployment (configure this according to your needs, follow [this](https://docs.render.com/docs/blueprint-spec) for more info)
  45. - `embedchain.json`: Contains embedchain specific configuration for deployment (you don't need to configure this)
  46. - `requirements.txt`: Contains python dependencies for your application
  47. ## Step-3: Test app locally
  48. You can run the app locally by simply doing:
  49. ```bash Run locally
  50. pip install -r requirements.txt
  51. ec dev
  52. ```
  53. ## Step-4: Deploy to render.com
  54. Before deploying to render.com, you only have to set up one thing.
  55. In the render.yaml file, make sure to modify the repo key by inserting the URL of your Git repository where your application will be hosted. You can create a repository from [GitHub](https://github.com) or [GitLab](https://gitlab.com/users/sign_in).
  56. After that, you're ready to deploy on render.com.
  57. ```bash Deploy app
  58. ec deploy
  59. ```
  60. When you run this, it should open up your render dashboard and you can see the app being deployed. You can find your hosted link over there only.
  61. You can also check the logs, monitor app status etc on their dashboard by running command `render dashboard`.
  62. <img src="/images/fly_io.png" />
  63. ## Seeking help?
  64. If you run into issues with deployment, please feel free to reach out to us via any of the following methods:
  65. <Snippet file="get-help.mdx" />