|
@@ -40,7 +40,11 @@ In case you run into issues, refer to official [fly.io docs](https://fly.io/docs
|
|
|
|
|
|
## Step-2: Create RAG app
|
|
## Step-2: Create RAG app
|
|
|
|
|
|
-We provide a command line utility called `ec` that inherits the template for `fly.io` platform and help you deploy the app. Follow the instructions to create a fly.io app using the template provided:
|
|
|
|
|
|
+We provide a command line utility called `ec` in embedchain that inherits the template for `fly.io` platform and help you deploy the app. Follow the instructions to create a fly.io app using the template provided:
|
|
|
|
+
|
|
|
|
+```bash Install embedchain
|
|
|
|
+pip install embedchain
|
|
|
|
+```
|
|
|
|
|
|
```bash Create application
|
|
```bash Create application
|
|
mkdir my-rag-app
|
|
mkdir my-rag-app
|
|
@@ -55,15 +59,17 @@ This will generate a directory structure like this:
|
|
├── fly.toml
|
|
├── fly.toml
|
|
├── .env
|
|
├── .env
|
|
├── .env.example
|
|
├── .env.example
|
|
|
|
+├── embedchain.json
|
|
└── requirements.txt
|
|
└── requirements.txt
|
|
```
|
|
```
|
|
|
|
|
|
Feel free to edit the files as required.
|
|
Feel free to edit the files as required.
|
|
- `Dockerfile`: Defines the steps to setup the application
|
|
- `Dockerfile`: Defines the steps to setup the application
|
|
-- `app.py`: Contains FastAPI app code
|
|
|
|
|
|
+- `app.py`: Contains API app code
|
|
- `fly.toml`: fly.io config file
|
|
- `fly.toml`: fly.io config file
|
|
- `.env`: Contains environment variables for production
|
|
- `.env`: Contains environment variables for production
|
|
- `.env.example`: Contains dummy environment variables (can ignore this file)
|
|
- `.env.example`: Contains dummy environment variables (can ignore this file)
|
|
|
|
+- `embedchain.json`: Contains embedchain specific configuration for deployment (you don't need to configure this)
|
|
- `requirements.txt`: Contains python dependencies for your FastAPI application
|
|
- `requirements.txt`: Contains python dependencies for your FastAPI application
|
|
|
|
|
|
## Step-3: Test app locally
|
|
## Step-3: Test app locally
|
|
@@ -82,7 +88,7 @@ You can deploy to fly.io using the following command:
|
|
ec deploy
|
|
ec deploy
|
|
```
|
|
```
|
|
|
|
|
|
-Once this step finished, it will provide you with the deployment endpoint where you can access the app live. It will look something like this:
|
|
|
|
|
|
+Once this step finished, it will provide you with the deployment endpoint where you can access the app live. It will look something like this (Swagger docs):
|
|
|
|
|
|
You can also check the logs, monitor app status etc on their dashboard by running command `fly dashboard`.
|
|
You can also check the logs, monitor app status etc on their dashboard by running command `fly dashboard`.
|
|
|
|
|