From ab879dfcc16ef90062c06b57ee31d8032a747c52 Mon Sep 17 00:00:00 2001 From: leehuwuj Date: Thu, 21 Nov 2024 17:23:00 +0700 Subject: [PATCH 01/10] update docker file --- helpers/env-variables.ts | 7 ----- .../components/deployments/python/Dockerfile | 28 +++++++++++++++++-- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/helpers/env-variables.ts b/helpers/env-variables.ts index ddac770d3..bcd658802 100644 --- a/helpers/env-variables.ts +++ b/helpers/env-variables.ts @@ -590,13 +590,6 @@ export const createFrontendEnvFile = async ( }, ) => { const defaultFrontendEnvs = [ - { - name: "NEXT_PUBLIC_CHAT_API", - description: "The backend API for chat endpoint.", - value: opts.customApiPath - ? opts.customApiPath - : "http://localhost:8000/api/chat", - }, { name: "NEXT_PUBLIC_USE_LLAMACLOUD", description: "Let's the user change indexes in LlamaCloud projects", diff --git a/templates/components/deployments/python/Dockerfile b/templates/components/deployments/python/Dockerfile index 624364b65..2dc9b1e31 100644 --- a/templates/components/deployments/python/Dockerfile +++ b/templates/components/deployments/python/Dockerfile @@ -1,4 +1,19 @@ -FROM python:3.11 as build +# ==================================== +# Build the frontend +# ==================================== +FROM node:20 AS frontend + +WORKDIR /app/frontend + +COPY .frontend /app/frontend + +RUN npm install && npm run build + + +# ==================================== +# Backend +# ==================================== +FROM python:3.11 AS build WORKDIR /app @@ -19,8 +34,15 @@ COPY ./pyproject.toml ./poetry.lock* /app/ RUN poetry install --no-root --no-cache --only main # ==================================== -FROM build as release +# Release +# ==================================== +FROM build AS release + +COPY --from=frontend /app/frontend/out /app/static COPY . . -CMD ["python", "main.py"] \ No newline at end of file +# Remove frontend code +RUN rm -rf .frontend + +CMD ["poetry", "run", "prod"] \ No newline at end of file From fc9495b416bafafba354fca45788f8dd3087a8b3 Mon Sep 17 00:00:00 2001 From: leehuwuj Date: Thu, 21 Nov 2024 18:01:28 +0700 Subject: [PATCH 02/10] update readme --- .../agents/python/blog/README-template.md | 18 ++++++++++++++++++ .../python/financial_report/README-template.md | 18 ++++++++++++++++++ .../python/form_filling/README-template.md | 18 ++++++++++++++++++ .../types/streaming/fastapi/README-template.md | 18 ++++++++++++++++++ 4 files changed, 72 insertions(+) diff --git a/templates/components/agents/python/blog/README-template.md b/templates/components/agents/python/blog/README-template.md index f6d928e25..5177e96fd 100644 --- a/templates/components/agents/python/blog/README-template.md +++ b/templates/components/agents/python/blog/README-template.md @@ -55,6 +55,24 @@ To start the app optimized for **production**, run: poetry run prod ``` +## Deployments + +### Deploy to [Fly.io](https://fly.io/): + +First, check out the [flyctl installation guide](https://fly.io/docs/flyctl/install/) and install it to your machine then authenticate with your Fly.io account: + +```shell +fly login +``` + +Then, run this command and follow the prompts to deploy the app.: + +```shell +fly launch --internal-port 8000 +``` + +- Note: Make sure all the needed environment variables in the [.env](.env) file (e.g. `OPENAI_API_KEY`) are set. + ## Learn More To learn more about LlamaIndex, take a look at the following resources: diff --git a/templates/components/agents/python/financial_report/README-template.md b/templates/components/agents/python/financial_report/README-template.md index 127544225..421f4f824 100644 --- a/templates/components/agents/python/financial_report/README-template.md +++ b/templates/components/agents/python/financial_report/README-template.md @@ -43,6 +43,24 @@ To start the app optimized for **production**, run: poetry run prod ``` +## Deployments + +### Deploy to [Fly.io](https://fly.io/): + +First, check out the [flyctl installation guide](https://fly.io/docs/flyctl/install/) and install it to your machine then authenticate with your Fly.io account: + +```shell +fly login +``` + +Then, run this command and follow the prompts to deploy the app.: + +```shell +fly launch --internal-port 8000 +``` + +- Note: Make sure all the needed environment variables in the [.env](.env) file (e.g. `OPENAI_API_KEY`) are set. + ## Learn More To learn more about LlamaIndex, take a look at the following resources: diff --git a/templates/components/agents/python/form_filling/README-template.md b/templates/components/agents/python/form_filling/README-template.md index 5a8af48d1..84ecbb6eb 100644 --- a/templates/components/agents/python/form_filling/README-template.md +++ b/templates/components/agents/python/form_filling/README-template.md @@ -49,6 +49,24 @@ To start the app optimized for **production**, run: poetry run prod ``` +## Deployments + +### Deploy to [Fly.io](https://fly.io/): + +First, check out the [flyctl installation guide](https://fly.io/docs/flyctl/install/) and install it to your machine then authenticate with your Fly.io account: + +```shell +fly login +``` + +Then, run this command and follow the prompts to deploy the app.: + +```shell +fly launch --internal-port 8000 +``` + +- Note: Make sure all the needed environment variables in the [.env](.env) file (e.g. `OPENAI_API_KEY`) are set. + ## Learn More To learn more about LlamaIndex, take a look at the following resources: diff --git a/templates/types/streaming/fastapi/README-template.md b/templates/types/streaming/fastapi/README-template.md index ceb6804b3..701022a36 100644 --- a/templates/types/streaming/fastapi/README-template.md +++ b/templates/types/streaming/fastapi/README-template.md @@ -92,6 +92,24 @@ docker run \ ``` +## Deployments + +### Deploy to [Fly.io](https://fly.io/): + +First, check out the [flyctl installation guide](https://fly.io/docs/flyctl/install/) and install it to your machine then authenticate with your Fly.io account: + +```shell +fly login +``` + +Then, run this command and follow the prompts to deploy the app.: + +```shell +fly launch --internal-port 8000 +``` + +- Note: Make sure all the needed environment variables in the [.env](.env) file (e.g. `OPENAI_API_KEY`) are set. + ## Learn More To learn more about LlamaIndex, take a look at the following resources: From c304cda41d97811412f06c96ba1ffffae59e13b9 Mon Sep 17 00:00:00 2001 From: leehuwuj Date: Fri, 22 Nov 2024 11:43:14 +0700 Subject: [PATCH 03/10] update docs --- .../streaming/fastapi/README-template.md | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/templates/types/streaming/fastapi/README-template.md b/templates/types/streaming/fastapi/README-template.md index 701022a36..6fab47ef1 100644 --- a/templates/types/streaming/fastapi/README-template.md +++ b/templates/types/streaming/fastapi/README-template.md @@ -58,7 +58,9 @@ To start the app optimized for **production**, run: poetry run prod ``` -## Using Docker +## Deployments + +### Deploy locally with Docker 1. Build an image for the FastAPI app: @@ -68,8 +70,6 @@ docker build -t . 2. Generate embeddings: -Parse the data and generate the vector embeddings if the `./data` folder exists - otherwise, skip this step: - ``` docker run \ --rm \ @@ -92,8 +92,6 @@ docker run \ ``` -## Deployments - ### Deploy to [Fly.io](https://fly.io/): First, check out the [flyctl installation guide](https://fly.io/docs/flyctl/install/) and install it to your machine then authenticate with your Fly.io account: @@ -108,7 +106,18 @@ Then, run this command and follow the prompts to deploy the app.: fly launch --internal-port 8000 ``` -- Note: Make sure all the needed environment variables in the [.env](.env) file (e.g. `OPENAI_API_KEY`) are set. +- Notes: + The deployment will use the values from the `.env` file by default. Make sure all the needed environment variables in the [.env](.env) file (e.g. `OPENAI_API_KEY`) are set. + + To override the values, you can use the environment variables setting in the Fly.io dashboard or using the `fly set` command. For more information, check out the [Environment Configuration](https://fly.io/docs/rails/the-basics/configuration/). + +After the app started successfully, you might need to execute the `generate` command remotely to generate embeddings of the documents in the `./data` directory (if this folder exists - otherwise, skip this step): + +``` +fly console --machine --command "poetry run generate" +``` + +Where `machine_id` is the ID of the machine where the app is running. You can show the running machines with the `fly machines` command. ## Learn More From 5bdd1ff7af613be1fb2893c788e70973b16562a6 Mon Sep 17 00:00:00 2001 From: Marcus Schiesser Date: Fri, 22 Nov 2024 12:13:21 +0700 Subject: [PATCH 04/10] docs: wordsmith --- templates/types/streaming/fastapi/DEPLOY.md | 71 +++++++++++++++++++ .../streaming/fastapi/README-template.md | 59 +-------------- 2 files changed, 72 insertions(+), 58 deletions(-) create mode 100644 templates/types/streaming/fastapi/DEPLOY.md diff --git a/templates/types/streaming/fastapi/DEPLOY.md b/templates/types/streaming/fastapi/DEPLOY.md new file mode 100644 index 000000000..ad9d5df2c --- /dev/null +++ b/templates/types/streaming/fastapi/DEPLOY.md @@ -0,0 +1,71 @@ +## Deployments + +### Using [Fly.io](https://fly.io/): + +First, install [flyctl](https://fly.io/docs/flyctl/install/) and then authenticate with your Fly.io account: + +```shell +fly login +``` + +Then, run this command and follow the prompts to deploy the app.: + +```shell +fly launch --internal-port 8000 +``` + +And to open the app in your browser: + +```shell +fly apps open +``` + +> **Note**: The app will use the values from the `.env` file by default to simplify the deployment. Make sure all the needed environment variables in the [.env](.env) file are set. For production environments, you should not use the `.env` file, but [set the variables in Fly.io](https://fly.io/docs/rails/the-basics/configuration/) instead. + +#### Custom documents + +If you're having documents in the `./data` folder, run the following command to generate vector embeddings of the documents: + +``` +fly console --machine --command "poetry run generate" +``` + +Where `machine_id` is the ID of the machine where the app is running. You can show the running machines with the `fly machines` command. + +### Using Docker + +First, build an image for the app: + +``` +docker build -t . +``` + +Then, start the app by running the image: + +``` +docker run \ + -v $(pwd)/.env:/app/.env \ # Use ENV variables and configuration from your file-system + -v $(pwd)/config:/app/config \ + -v $(pwd)/storage:/app/storage \ # Use your file system to store vector embeddings + -p 8000:8000 \ + +``` + +Open [http://localhost:8000](http://localhost:8000) with your browser to start the app. + +#### Custom documents + +If you're having documents in the `./data` folder, run the following command to generate vector embeddings of the documents: + +``` +docker run \ + --rm \ + -v $(pwd)/.env:/app/.env \ # Use ENV variables and configuration from your file-system + -v $(pwd)/config:/app/config \ + -v $(pwd)/data:/app/data \ # Use your local folder to read the data + -v $(pwd)/storage:/app/storage \ # Use your file system to store the vector database + \ + poetry run generate +``` + +The app will then be able to answer questions about the documents in the `./data` folder. diff --git a/templates/types/streaming/fastapi/README-template.md b/templates/types/streaming/fastapi/README-template.md index 6fab47ef1..00a522e7e 100644 --- a/templates/types/streaming/fastapi/README-template.md +++ b/templates/types/streaming/fastapi/README-template.md @@ -60,64 +60,7 @@ poetry run prod ## Deployments -### Deploy locally with Docker - -1. Build an image for the FastAPI app: - -``` -docker build -t . -``` - -2. Generate embeddings: - -``` -docker run \ - --rm \ - -v $(pwd)/.env:/app/.env \ # Use ENV variables and configuration from your file-system - -v $(pwd)/config:/app/config \ - -v $(pwd)/data:/app/data \ # Use your local folder to read the data - -v $(pwd)/storage:/app/storage \ # Use your file system to store the vector database - \ - poetry run generate -``` - -3. Start the API: - -``` -docker run \ - -v $(pwd)/.env:/app/.env \ # Use ENV variables and configuration from your file-system - -v $(pwd)/config:/app/config \ - -v $(pwd)/storage:/app/storage \ # Use your file system to store gea vector database - -p 8000:8000 \ - -``` - -### Deploy to [Fly.io](https://fly.io/): - -First, check out the [flyctl installation guide](https://fly.io/docs/flyctl/install/) and install it to your machine then authenticate with your Fly.io account: - -```shell -fly login -``` - -Then, run this command and follow the prompts to deploy the app.: - -```shell -fly launch --internal-port 8000 -``` - -- Notes: - The deployment will use the values from the `.env` file by default. Make sure all the needed environment variables in the [.env](.env) file (e.g. `OPENAI_API_KEY`) are set. - - To override the values, you can use the environment variables setting in the Fly.io dashboard or using the `fly set` command. For more information, check out the [Environment Configuration](https://fly.io/docs/rails/the-basics/configuration/). - -After the app started successfully, you might need to execute the `generate` command remotely to generate embeddings of the documents in the `./data` directory (if this folder exists - otherwise, skip this step): - -``` -fly console --machine --command "poetry run generate" -``` - -Where `machine_id` is the ID of the machine where the app is running. You can show the running machines with the `fly machines` command. +For production deployments, check the [DEPLOY.md](DEPLOY.md) file. ## Learn More From e5a7e0f4d5b4cb72310d9b1a1253ef513052e936 Mon Sep 17 00:00:00 2001 From: Marcus Schiesser Date: Fri, 22 Nov 2024 12:55:32 +0700 Subject: [PATCH 05/10] docs: add vectorDB --- templates/types/streaming/fastapi/DEPLOY.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/templates/types/streaming/fastapi/DEPLOY.md b/templates/types/streaming/fastapi/DEPLOY.md index ad9d5df2c..2e9baa85b 100644 --- a/templates/types/streaming/fastapi/DEPLOY.md +++ b/templates/types/streaming/fastapi/DEPLOY.md @@ -22,7 +22,7 @@ fly apps open > **Note**: The app will use the values from the `.env` file by default to simplify the deployment. Make sure all the needed environment variables in the [.env](.env) file are set. For production environments, you should not use the `.env` file, but [set the variables in Fly.io](https://fly.io/docs/rails/the-basics/configuration/) instead. -#### Custom documents +#### Documents If you're having documents in the `./data` folder, run the following command to generate vector embeddings of the documents: @@ -32,6 +32,8 @@ fly console --machine --command "poetry run generate" Where `machine_id` is the ID of the machine where the app is running. You can show the running machines with the `fly machines` command. +> **Note**: Using documents will make the app stateful. As Fly.io is a stateless app, you will need a vector database to store the embeddings of the documents. This applies also for document uploads by the user. + ### Using Docker First, build an image for the app: @@ -53,7 +55,7 @@ docker run \ Open [http://localhost:8000](http://localhost:8000) with your browser to start the app. -#### Custom documents +#### Documents If you're having documents in the `./data` folder, run the following command to generate vector embeddings of the documents: From ec870bb502956aef2d2301e71c250f6ddc4392b6 Mon Sep 17 00:00:00 2001 From: leehuwuj Date: Fri, 22 Nov 2024 13:13:55 +0700 Subject: [PATCH 06/10] remove internal port --- helpers/python.ts | 5 ----- helpers/typescript.ts | 5 ----- .../agents/python/blog/README-template.md | 2 +- .../python/financial_report/README-template.md | 2 +- .../python/form_filling/README-template.md | 2 +- .../streaming/express}/Dockerfile | 0 templates/types/streaming/fastapi/DEPLOY.md | 2 +- .../streaming/fastapi}/Dockerfile | 2 ++ templates/types/streaming/nextjs/Dockerfile | 16 ++++++++++++++++ 9 files changed, 22 insertions(+), 14 deletions(-) rename templates/{components/deployments/typescript => types/streaming/express}/Dockerfile (100%) rename templates/{components/deployments/python => types/streaming/fastapi}/Dockerfile (98%) create mode 100644 templates/types/streaming/nextjs/Dockerfile diff --git a/helpers/python.ts b/helpers/python.ts index f57f6e970..0e5ac7c70 100644 --- a/helpers/python.ts +++ b/helpers/python.ts @@ -548,9 +548,4 @@ export const installPythonTemplate = async ({ if (postInstallAction === "runApp" || postInstallAction === "dependencies") { installPythonDependencies(); } - - // Copy deployment files for python - await copy("**", root, { - cwd: path.join(compPath, "deployments", "python"), - }); }; diff --git a/helpers/typescript.ts b/helpers/typescript.ts index d0064bfd2..3c57ba3bb 100644 --- a/helpers/typescript.ts +++ b/helpers/typescript.ts @@ -247,11 +247,6 @@ export const installTSTemplate = async ({ ) { await installTSDependencies(packageJson, packageManager, isOnline); } - - // Copy deployment files for typescript - await copy("**", root, { - cwd: path.join(compPath, "deployments", "typescript"), - }); }; async function updatePackageJson({ diff --git a/templates/components/agents/python/blog/README-template.md b/templates/components/agents/python/blog/README-template.md index 5177e96fd..b7313c178 100644 --- a/templates/components/agents/python/blog/README-template.md +++ b/templates/components/agents/python/blog/README-template.md @@ -68,7 +68,7 @@ fly login Then, run this command and follow the prompts to deploy the app.: ```shell -fly launch --internal-port 8000 +fly launch ``` - Note: Make sure all the needed environment variables in the [.env](.env) file (e.g. `OPENAI_API_KEY`) are set. diff --git a/templates/components/agents/python/financial_report/README-template.md b/templates/components/agents/python/financial_report/README-template.md index 421f4f824..b7794f2ea 100644 --- a/templates/components/agents/python/financial_report/README-template.md +++ b/templates/components/agents/python/financial_report/README-template.md @@ -56,7 +56,7 @@ fly login Then, run this command and follow the prompts to deploy the app.: ```shell -fly launch --internal-port 8000 +fly launch ``` - Note: Make sure all the needed environment variables in the [.env](.env) file (e.g. `OPENAI_API_KEY`) are set. diff --git a/templates/components/agents/python/form_filling/README-template.md b/templates/components/agents/python/form_filling/README-template.md index 84ecbb6eb..282ddbafe 100644 --- a/templates/components/agents/python/form_filling/README-template.md +++ b/templates/components/agents/python/form_filling/README-template.md @@ -62,7 +62,7 @@ fly login Then, run this command and follow the prompts to deploy the app.: ```shell -fly launch --internal-port 8000 +fly launch ``` - Note: Make sure all the needed environment variables in the [.env](.env) file (e.g. `OPENAI_API_KEY`) are set. diff --git a/templates/components/deployments/typescript/Dockerfile b/templates/types/streaming/express/Dockerfile similarity index 100% rename from templates/components/deployments/typescript/Dockerfile rename to templates/types/streaming/express/Dockerfile diff --git a/templates/types/streaming/fastapi/DEPLOY.md b/templates/types/streaming/fastapi/DEPLOY.md index 2e9baa85b..da966fe94 100644 --- a/templates/types/streaming/fastapi/DEPLOY.md +++ b/templates/types/streaming/fastapi/DEPLOY.md @@ -11,7 +11,7 @@ fly login Then, run this command and follow the prompts to deploy the app.: ```shell -fly launch --internal-port 8000 +fly launch ``` And to open the app in your browser: diff --git a/templates/components/deployments/python/Dockerfile b/templates/types/streaming/fastapi/Dockerfile similarity index 98% rename from templates/components/deployments/python/Dockerfile rename to templates/types/streaming/fastapi/Dockerfile index 2dc9b1e31..7e3a0143a 100644 --- a/templates/components/deployments/python/Dockerfile +++ b/templates/types/streaming/fastapi/Dockerfile @@ -45,4 +45,6 @@ COPY . . # Remove frontend code RUN rm -rf .frontend +EXPOSE 8000 + CMD ["poetry", "run", "prod"] \ No newline at end of file diff --git a/templates/types/streaming/nextjs/Dockerfile b/templates/types/streaming/nextjs/Dockerfile new file mode 100644 index 000000000..5c738ab4a --- /dev/null +++ b/templates/types/streaming/nextjs/Dockerfile @@ -0,0 +1,16 @@ +FROM node:20-alpine as build + +WORKDIR /app + +# Install dependencies +COPY package.json package-lock.* ./ +RUN npm install + +# Build the application +COPY . . +RUN npm run build + +# ==================================== +FROM build as release + +CMD ["npm", "run", "start"] \ No newline at end of file From f7433f493a6d8621523ad0b2b68eea4f51065526 Mon Sep 17 00:00:00 2001 From: leehuwuj Date: Fri, 22 Nov 2024 13:23:44 +0700 Subject: [PATCH 07/10] update ha doc --- templates/types/streaming/fastapi/DEPLOY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/types/streaming/fastapi/DEPLOY.md b/templates/types/streaming/fastapi/DEPLOY.md index da966fe94..7ef8860fb 100644 --- a/templates/types/streaming/fastapi/DEPLOY.md +++ b/templates/types/streaming/fastapi/DEPLOY.md @@ -32,7 +32,7 @@ fly console --machine --command "poetry run generate" Where `machine_id` is the ID of the machine where the app is running. You can show the running machines with the `fly machines` command. -> **Note**: Using documents will make the app stateful. As Fly.io is a stateless app, you will need a vector database to store the embeddings of the documents. This applies also for document uploads by the user. +> **Note**: Using documents will make the app stateful. As Fly.io is a stateless app, you should use [LlamaCloud](https://docs.cloud.llamaindex.ai/llamacloud/getting_started) or a vector database to store the embeddings of the documents. This applies also for document uploads by the user. ### Using Docker From c58338f1c3f25ce392f39fa0ccab8f08e524c678 Mon Sep 17 00:00:00 2001 From: leehuwuj Date: Fri, 22 Nov 2024 13:47:05 +0700 Subject: [PATCH 08/10] add missing change --- .../agents/python/blog/README-template.md | 16 +--------------- .../python/financial_report/README-template.md | 16 +--------------- .../python/form_filling/README-template.md | 16 +--------------- 3 files changed, 3 insertions(+), 45 deletions(-) diff --git a/templates/components/agents/python/blog/README-template.md b/templates/components/agents/python/blog/README-template.md index b7313c178..730b20d8c 100644 --- a/templates/components/agents/python/blog/README-template.md +++ b/templates/components/agents/python/blog/README-template.md @@ -57,21 +57,7 @@ poetry run prod ## Deployments -### Deploy to [Fly.io](https://fly.io/): - -First, check out the [flyctl installation guide](https://fly.io/docs/flyctl/install/) and install it to your machine then authenticate with your Fly.io account: - -```shell -fly login -``` - -Then, run this command and follow the prompts to deploy the app.: - -```shell -fly launch -``` - -- Note: Make sure all the needed environment variables in the [.env](.env) file (e.g. `OPENAI_API_KEY`) are set. +For production deployments, check the [DEPLOY.md](DEPLOY.md) file. ## Learn More diff --git a/templates/components/agents/python/financial_report/README-template.md b/templates/components/agents/python/financial_report/README-template.md index b7794f2ea..5359c81df 100644 --- a/templates/components/agents/python/financial_report/README-template.md +++ b/templates/components/agents/python/financial_report/README-template.md @@ -45,21 +45,7 @@ poetry run prod ## Deployments -### Deploy to [Fly.io](https://fly.io/): - -First, check out the [flyctl installation guide](https://fly.io/docs/flyctl/install/) and install it to your machine then authenticate with your Fly.io account: - -```shell -fly login -``` - -Then, run this command and follow the prompts to deploy the app.: - -```shell -fly launch -``` - -- Note: Make sure all the needed environment variables in the [.env](.env) file (e.g. `OPENAI_API_KEY`) are set. +For production deployments, check the [DEPLOY.md](DEPLOY.md) file. ## Learn More diff --git a/templates/components/agents/python/form_filling/README-template.md b/templates/components/agents/python/form_filling/README-template.md index 282ddbafe..d1ab8e56b 100644 --- a/templates/components/agents/python/form_filling/README-template.md +++ b/templates/components/agents/python/form_filling/README-template.md @@ -51,21 +51,7 @@ poetry run prod ## Deployments -### Deploy to [Fly.io](https://fly.io/): - -First, check out the [flyctl installation guide](https://fly.io/docs/flyctl/install/) and install it to your machine then authenticate with your Fly.io account: - -```shell -fly login -``` - -Then, run this command and follow the prompts to deploy the app.: - -```shell -fly launch -``` - -- Note: Make sure all the needed environment variables in the [.env](.env) file (e.g. `OPENAI_API_KEY`) are set. +For production deployments, check the [DEPLOY.md](DEPLOY.md) file. ## Learn More From fd499ba257c58a9e488c1ee947e72823279cb5d1 Mon Sep 17 00:00:00 2001 From: Marcus Schiesser Date: Fri, 22 Nov 2024 15:31:15 +0700 Subject: [PATCH 09/10] fix: command --- templates/types/streaming/fastapi/DEPLOY.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/types/streaming/fastapi/DEPLOY.md b/templates/types/streaming/fastapi/DEPLOY.md index 7ef8860fb..59881f7bb 100644 --- a/templates/types/streaming/fastapi/DEPLOY.md +++ b/templates/types/streaming/fastapi/DEPLOY.md @@ -5,7 +5,7 @@ First, install [flyctl](https://fly.io/docs/flyctl/install/) and then authenticate with your Fly.io account: ```shell -fly login +fly auth login ``` Then, run this command and follow the prompts to deploy the app.: From d9f939de005fc6f7a1e157581727bb5df5930744 Mon Sep 17 00:00:00 2001 From: Marcus Schiesser Date: Fri, 22 Nov 2024 16:34:14 +0700 Subject: [PATCH 10/10] docs: changeset --- .changeset/olive-comics-grab.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/olive-comics-grab.md diff --git a/.changeset/olive-comics-grab.md b/.changeset/olive-comics-grab.md new file mode 100644 index 000000000..0706749d6 --- /dev/null +++ b/.changeset/olive-comics-grab.md @@ -0,0 +1,5 @@ +--- +"create-llama": patch +--- + +Add fly.io deployment