suna/backend
marko-kraemer 1e43fa5053 gemini flash as free model 2025-05-07 05:44:10 +02:00
..
.github/workflows fe reference wip 2025-03-29 23:48:57 -07:00
agent gemini flash as free model 2025-05-07 05:44:10 +02:00
agentpress make non-anthropic model work with response example, fe padding bottom increase cuz of new chat input 2025-05-07 01:56:52 +02:00
sandbox python billing 2025-04-27 00:47:31 +01:00
services chore(ui): model selector, paywall, switch to qwen 235B 2025-05-07 01:44:50 +05:30
supabase fix: policy and share page api error 2025-05-04 15:49:26 +02:00
utils change to deepseek 2025-05-07 02:12:48 +02:00
.env.example Add support for self hosted Firecrawl 2025-05-05 21:05:02 -07:00
.gitignore delete user sandboxes script 2025-05-02 15:50:33 +02:00
Dockerfile docker conf updated 2025-04-27 22:21:59 +01:00
MANIFEST.in fe reference wip 2025-03-29 23:48:57 -07:00
README.md redis & docker compose for prod 2025-04-24 22:15:47 +01:00
api.py python billing 2025-04-27 00:47:31 +01:00
docker-compose.yml docker conf updated 2025-04-27 22:21:59 +01:00
fly.production.toml logger, docker, wip 2025-04-24 23:04:59 +01:00
fly.staging.toml logger, docker, wip 2025-04-24 23:04:59 +01:00
poetry.lock fix dependency 2025-04-27 04:10:38 +01:00
pyproject.toml fix dependency 2025-04-27 04:10:38 +01:00
requirements.txt fix dependency 2025-04-27 04:10:38 +01:00

README.md

Suna Backend

Running the backend

Within the backend directory, run the following command to stop and start the backend:

docker compose down && docker compose up --build

Running Individual Services

You can run individual services from the docker-compose file. This is particularly useful during development:

Running only Redis

docker compose up redis

Running only the API

docker compose up api

Development Setup

For local development, you might only need to run Redis while working on the API locally. This is useful when:

  • You're making changes to the API code and want to test them directly
  • You want to avoid rebuilding the API container on every change
  • You're running the API service directly on your machine

To run just Redis for development:```bash docker compose up redis


Then you can run your API service locally with your preferred method (e.g., poetry run python3.11 api.py).

### Environment Configuration
When running services individually, make sure to:
1. Check your `.env` file and adjust any necessary environment variables
2. Ensure Redis connection settings match your local setup (default: `localhost:6379`)
3. Update any service-specific environment variables if needed

### Important: Redis Host Configuration
When running the API locally with Redis in Docker, you need to set the correct Redis host in your `.env` file:
- For Docker-to-Docker communication (when running both services in Docker): use `REDIS_HOST=redis`
- For local-to-Docker communication (when running API locally): use `REDIS_HOST=localhost`

Example `.env` configuration for local development:
```env
REDIS_HOST=localhost (instead of 'redis')
REDIS_PORT=6379
REDIS_PASSWORD=