Fly.io test

This commit is contained in:
Vineeth Voruganti 2024-01-18 08:36:49 -08:00
parent 816511f8e4
commit 9ea87cdb71
3 changed files with 25 additions and 24 deletions

View File

@ -1,20 +0,0 @@
# Supabase
SUPABASE_URL
SUPABASE_KEY
MEMORY_TABLE
CONVERSATION_TABLE
VECTOR_TABLE
MATCH_FUNCTION
# OpenAI
OPENAI_API_KEY=
OPENAI_API_TYPE=
OPENAI_API_BASE=
OPENAI_API_VERSION=
OPENAI_API_DEPLOYMENT_NAME=
# Sentry
SENTRY_DSN=
SENTRY_ENVIRONMENT=
SENTRY_RELEASE=

View File

@ -76,6 +76,20 @@ docker build -t honcho-api .
docker run --env-file .env -p 8000:8000 honcho-api:latest
```
#### Deploy on Fly
The API can also be deployed on fly.io with the following commands:
```bash
cd honcho/api
fly launch
```
You can also add your secrets with the following shortcut command:
```bash
cat .env | fly secrets import
```
### Client SDK
Install the honcho client sdk from a python project with the following command:

View File

@ -1,18 +1,19 @@
# fly.toml app configuration file generated for honcho on 2023-09-11T10:58:33-04:00
# fly.toml app configuration file generated for honcho-restless-dew-484 on 2024-01-18T08:20:57-08:00
#
# See https://fly.io/docs/reference/configuration/ for information about how to use this file.
#
app = "honcho"
primary_region = "bos"
kill_signal = "SIGINT"
kill_timeout = "5s"
[experimental]
auto_rollback = true
[build]
[processes]
api = "python -m uvicorn main:app --host 0.0.0.0 --port 8000"
api = "python -m uvicorn src.main:app --host 0.0.0.0 --port 8000"
[http_service]
internal_port = 8000
@ -22,5 +23,11 @@ api = "python -m uvicorn main:app --host 0.0.0.0 --port 8000"
processes = ["api"]
[http_service.concurrency]
type = "requests"
soft_limit = 200
hard_limit = 250
soft_limit = 200
[[vm]]
cpu_kind = "shared"
cpus = 1
memory_mb = 512
processes = ["api"]