Skip to content

DefangSamples/sample-crew-django-redis-postgres-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crew.ai Django Sample

1-click-deploy

This sample shows how to use Crew.ai with a Django application. It provides a simple web interface that allows users to input text and receive a summary of the text in real-time using Django Channels with a Redis broker. It uses Celery to handle the Crew.ai tasks in the background with Redis as a broker. It uses Postgres as the database for Django.

Prerequisites

  1. Download Defang CLI
  2. (Optional) If you are using Defang BYOC authenticate with your cloud provider account
  3. (Optional for local development) Docker CLI

Development

To run the application locally, you can use the following command:

docker compose -f ./compose.local.yaml up --build

Configuration

For this sample, you will need to provide the following configuration:

Note that if you are using the 1-click deploy option, you can set these values as secrets in your GitHub repository and the action will automatically deploy them for you.

POSTGRES_PASSWORD

The password for the Postgres database.

defang config set POSTGRES_PASSWORD

SSL_MODE

The SSL mode for the Postgres database.

defang config set SSL_MODE

DJANGO_SECRET_KEY

The secret key for the Django application.

defang config set DJANGO_SECRET_KEY

Deployment

Note

Download Defang CLI

Defang Playground

Deploy your application to the Defang Playground by opening up your terminal and typing:

defang compose up

BYOC

If you want to deploy to your own cloud account, you can use Defang BYOC.


Title: Crew.ai Django Sample

Short Description: A sample application that uses Crew.ai to summarize text in a background task, streamed to the user in real-time.

Tags: Django, Celery, Redis, Postgres, AI, ML

Languages: Python

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published