Spaces:
Running
Running
docs: update deployment instructions for Render
Browse files
README.md
CHANGED
|
@@ -116,18 +116,36 @@ This script generates a user ID. Add that ID to your `frontend/.env.local` as `N
|
|
| 116 |
|
| 117 |
---
|
| 118 |
|
| 119 |
-
##
|
| 120 |
-
|
| 121 |
-
This project
|
| 122 |
-
|
| 123 |
-
###
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
-
|
| 130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 131 |
|
| 132 |
---
|
| 133 |
|
|
|
|
| 116 |
|
| 117 |
---
|
| 118 |
|
| 119 |
+
## 🚀 Deployment (Render)
|
| 120 |
+
|
| 121 |
+
This project is fully configured for a seamless 1-click deployment on [Render](https://render.com) using the included `render.yaml` Blueprint and a unified `Dockerfile` that serves both the FastAPI backend and Next.js frontend in a single Web Service.
|
| 122 |
+
|
| 123 |
+
### Why Render?
|
| 124 |
+
Render seamlessly handles Docker containers. Because Docker containers have ephemeral file systems, if you deploy this project with the default SQLite database, **your data will be erased every time the server restarts or redeploys.** To solve this, you should provision a PostgreSQL database on Render.
|
| 125 |
+
|
| 126 |
+
### Step-by-Step Deployment Guide
|
| 127 |
+
|
| 128 |
+
1. **Create a PostgreSQL Database on Render**
|
| 129 |
+
- Go to your Render Dashboard and click **New +** -> **PostgreSQL**.
|
| 130 |
+
- Give it a name and click **Create Database**.
|
| 131 |
+
- Once created, scroll down to connections and copy the **Internal Database URL**.
|
| 132 |
+
|
| 133 |
+
2. **Deploy the Web Service via Blueprint**
|
| 134 |
+
- Click **New +** -> **Blueprint**.
|
| 135 |
+
- Connect your GitHub account and select your `InnerVoice` repository.
|
| 136 |
+
- Render will automatically detect the `render.yaml` file and configure the Web Service to run using Docker.
|
| 137 |
+
|
| 138 |
+
3. **Configure Environment Variables**
|
| 139 |
+
Render will prompt you for the necessary Environment Variables. Fill them in:
|
| 140 |
+
- `DATABASE_URL`: Paste the **Internal Database URL** you copied in Step 1. (SQLAlchemy will automatically detect this and switch from SQLite to PostgreSQL!)
|
| 141 |
+
- `GROQ_API_KEY`: Your Groq API key for the LLM insights.
|
| 142 |
+
- `BREVO_API_KEY`: Your Brevo API key for transactional emails.
|
| 143 |
+
- `BREVO_SENDER_EMAIL`: The verified sender email you configured on Brevo.
|
| 144 |
+
|
| 145 |
+
4. **Launch**
|
| 146 |
+
- Click **Apply**.
|
| 147 |
+
- Render will build the Docker container (which builds the static Next.js files and installs all Python ML dependencies) and bind the unified service to the web.
|
| 148 |
+
- *Note: The initial build may take a few minutes as it downloads the ~1.5GB Wav2Vec2 and RoBERTa models.*
|
| 149 |
|
| 150 |
---
|
| 151 |
|