From 8aac99208a70a1cbd3862fb1c2c93c17aacf8aa2 Mon Sep 17 00:00:00 2001 From: santoshkumarradha Date: Tue, 11 Nov 2025 14:13:18 -0500 Subject: [PATCH] Configure PostgreSQL for control plane Adds environment variables to the Docker Compose file to configure the control plane to use PostgreSQL for storage. Updates the README with instructions on setting AGENT_CALLBACK_URL for agents running outside Docker, as they cannot reach localhost. --- README.md | 13 +++++++++++++ deployments/docker/docker-compose.yml | 3 +++ 2 files changed, 16 insertions(+) diff --git a/README.md b/README.md index 1a75ebd5..507a86d1 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,19 @@ cd agentfield && docker compose up Your control plane is running at `http://localhost:8080` +
+export AGENT_CALLBACK_URL="http://host.docker.internal:8001" + +**Heads-up:** When your agent nodes run outside the Docker network (local shell, another VM, etc.) they can't be reached through `localhost`. Before starting any agent, set a callback URL that the control plane can dial: + +```bash +export AGENT_CALLBACK_URL="http://host.docker.internal:8001" +``` + +Replace `host.docker.internal` with whatever host/IP the control plane can reach if you're on Linux or a remote machine. + +
+ **[📚 Full quickstart guide →](https://agentfield.ai/docs/quick-start)** ```python diff --git a/deployments/docker/docker-compose.yml b/deployments/docker/docker-compose.yml index 3c6788ef..acc27347 100644 --- a/deployments/docker/docker-compose.yml +++ b/deployments/docker/docker-compose.yml @@ -17,6 +17,9 @@ services: context: ../.. dockerfile: deployments/docker/Dockerfile.control-plane environment: + AGENTFIELD_STORAGE_MODE: postgres + AGENTFIELD_POSTGRES_URL: postgres://agentfield:agentfield@postgres:5432/agentfield?sslmode=disable + AGENTFIELD_STORAGE_POSTGRES_URL: postgres://agentfield:agentfield@postgres:5432/agentfield?sslmode=disable AGENTFIELD_DATABASE_URL: postgres://agentfield:agentfield@postgres:5432/agentfield?sslmode=disable AGENTFIELD_HTTP_ADDR: 0.0.0.0:8080 ports: