diff --git a/.env.template b/.env.template deleted file mode 100644 index 06422a6c..00000000 --- a/.env.template +++ /dev/null @@ -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= - diff --git a/README.md b/README.md index f4e47c6f..2a549aed 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/fly.toml b/api/fly.toml similarity index 63% rename from fly.toml rename to api/fly.toml index d36e890b..d0629718 100644 --- a/fly.toml +++ b/api/fly.toml @@ -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"]