/chainlit-deploy-flyio

Deploy Chainlit Application to Fly.io Example

Primary LanguagePython

Deploy Chainlit Application to Fly.io Example

Setup

Requirements

1. Install Dependencies

poetry install

2. Configure Environment

cp .env.example .env

OPENAI_API_KEY is required to run the application. You can get one from OpenAI.

3. Run Application (Local)

docker-compose build
docker-compose up

Deploy to Fly.io

1. Create a Fly.io App

fly apps create [app-name]

2. Set Fly.io Secrets

fly secrets set OPENAI_API_KEY=[your-openai-api-key] CHAINLIT_HOST=0.0.0.0 CHAINLIT_PORT=8080

3. Deploy to Fly.io

fly deploy