AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
feat(infra): add rabbitmq to docker compose (#9437)
Nicholas Tindle1a4ba533caab
diff --git a/autogpt_platform/backend/.env.example b/autogpt_platform/backend/.env.exampleindex b9267f4d4a..ceb3570343 100644--- a/autogpt_platform/backend/.env.example+++ b/autogpt_platform/backend/.env.example@@ -31,6 +31,12 @@ SUPABASE_URL=http://localhost:8000SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4QSUPABASE_JWT_SECRET=your-super-secret-jwt-token-with-at-least-32-characters-long+# RabbitMQ credentials -- Used for communication between services+RABBITMQ_HOST=localhost+RABBITMQ_PORT=5672+RABBITMQ_DEFAULT_USER=rabbitmq_user_default+RABBITMQ_DEFAULT_PASS=k0VMxyIJF9S35f3x2uaw5IWAl6Y536O7+## For local development, you may need to set FRONTEND_BASE_URL for the OAuth flow## for integrations to work. Defaults to the value of PLATFORM_BASE_URL if not set.# FRONTEND_BASE_URL=http://localhost:3000diff --git a/autogpt_platform/docker-compose.platform.yml b/autogpt_platform/docker-compose.platform.ymlindex e013616db5..2ba1987612 100644--- a/autogpt_platform/docker-compose.platform.yml+++ b/autogpt_platform/docker-compose.platform.yml@@ -36,6 +36,21 @@ services:interval: 10stimeout: 5sretries: 5+ rabbitmq:+ image: rabbitmq:management+ container_name: rabbitmq+ healthcheck:+ test: rabbitmq-diagnostics -q ping+ interval: 30s+ timeout: 10s+ retries: 5+ start_period: 10s+ environment:+ - RABBITMQ_DEFAULT_USER=rabbitmq_user_default+ - RABBITMQ_DEFAULT_PASS=k0VMxyIJF9S35f3x2uaw5IWAl6Y536O7 # CHANGE THIS TO A RANDOM PASSWORD IN PRODUCTION -- everywhere lol+ ports:+ - "5672:5672"+ - "15672:15672"rest_server:build:@@ -55,6 +70,8 @@ services:condition: service_healthymigrate:condition: service_completed_successfully+ rabbitmq:+ condition: service_healthyenvironment:- SUPABASE_URL=http://kong:8000- SUPABASE_JWT_SECRET=your-super-secret-jwt-token-with-at-least-32-characters-long@@ -62,6 +79,10 @@ services:- DATABASE_URL=postgresql://postgres:your-super-secret-and-long-postgres-password@db:5432/postgres?connect_timeout=60&schema=platform- REDIS_HOST=redis- REDIS_PORT=6379+ - RABBITMQ_HOST=rabbitmq+ - RABBITMQ_PORT=5672+ - RABBITMQ_USER=rabbitmq_user_default+ - RABBITMQ_PASSWORD=k0VMxyIJF9S35f3x2uaw5IWAl6Y536O7- REDIS_PASSWORD=password- ENABLE_AUTH=true- PYRO_HOST=0.0.0.0@@ -69,7 +90,7 @@ services:- EXECUTIONMANAGER_HOST=executor- FRONTEND_BASE_URL=http://localhost:3000- BACKEND_CORS_ALLOW_ORIGINS=["http://localhost:3000"]- - ENCRYPTION_KEY=dvziYgz0KSK8FENhju0ZYi8-fRTfAdlz6YLhdB_jhNw= # DO NOT USE IN PRODUCTION!!+ - ENCRYPTION_KEY=dvziYgz0KSK8FENhju0ZYi8-fRTfAdlz6YLhdB_jhNw= # DO NOT USE IN PRODUCTION!!ports:- "8006:8006"- "8003:8003" # execution scheduler@@ -90,6 +111,8 @@ services:depends_on:redis:condition: service_healthy+ rabbitmq:+ condition: service_healthydb:condition: service_healthymigrate:@@ -102,10 +125,14 @@ services:- REDIS_HOST=redis- REDIS_PORT=6379- REDIS_PASSWORD=password+ - RABBITMQ_HOST=rabbitmq+ - RABBITMQ_PORT=5672+ - RABBITMQ_USER=rabbitmq_user_default+ - RABBITMQ_PASSWORD=k0VMxyIJF9S35f3x2uaw5IWAl6Y536O7- ENABLE_AUTH=true- PYRO_HOST=0.0.0.0- AGENTSERVER_HOST=rest_server- - ENCRYPTION_KEY=dvziYgz0KSK8FENhju0ZYi8-fRTfAdlz6YLhdB_jhNw= # DO NOT USE IN PRODUCTION!!+ - ENCRYPTION_KEY=dvziYgz0KSK8FENhju0ZYi8-fRTfAdlz6YLhdB_jhNw= # DO NOT USE IN PRODUCTION!!ports:- "8002:8000"networks:@@ -127,14 +154,20 @@ services:condition: service_healthyredis:condition: service_healthy+ # rabbitmq:+ # condition: service_healthymigrate:- condition: service_completed_successfully+ condition: service_completed_successfullyenvironment:- SUPABASE_JWT_SECRET=your-super-secret-jwt-token-with-at-least-32-characters-long- DATABASE_URL=postgresql://postgres:your-super-secret-and-long-postgres-password@db:5432/postgres?connect_timeout=60&schema=platform- REDIS_HOST=redis- REDIS_PORT=6379- REDIS_PASSWORD=password+ # - RABBITMQ_HOST=rabbitmq # TODO: Uncomment this when we have a need for it in websocket (like nofifying when stuff went down)+ # - RABBITMQ_PORT=5672+ # - RABBITMQ_USER=rabbitmq_user_default+ # - RABBITMQ_PASSWORD=k0VMxyIJF9S35f3x2uaw5IWAl6Y536O7- ENABLE_AUTH=true- PYRO_HOST=0.0.0.0- BACKEND_CORS_ALLOW_ORIGINS=["http://localhost:3000"]diff --git a/autogpt_platform/docker-compose.yml b/autogpt_platform/docker-compose.ymlindex 9166e0e327..1eda20a625 100644--- a/autogpt_platform/docker-compose.yml+++ b/autogpt_platform/docker-compose.yml@@ -33,6 +33,12 @@ services:file: ./docker-compose.platform.ymlservice: redis+ rabbitmq:+ <<: *agpt-services+ extends:+ file: ./docker-compose.platform.yml+ service: rabbitmq+rest_server:<<: *agpt-servicesextends:@@ -146,3 +152,4 @@ services:- db- vector- redis+ - rabbitmq