AutoGPT/rnd/docker-compose.yml

202 lines
5.0 KiB
YAML

services:
postgres:
image: ankane/pgvector:latest
environment:
- POSTGRES_USER=agpt_user
- POSTGRES_PASSWORD=pass123
- POSTGRES_DB=agpt_local
healthcheck:
test: pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB
interval: 10s
timeout: 5s
retries: 5
ports:
- "5432:5432"
networks:
- app-network
migrate:
build:
context: ../
dockerfile: rnd/autogpt_server/Dockerfile
target: server
develop:
watch:
- path: ./
target: rnd/autogpt_server/migrate
action: rebuild
command: ["poetry", "run", "prisma", "migrate", "deploy"]
depends_on:
postgres:
condition: service_healthy
environment:
- DATABASE_URL=postgresql://agpt_user:pass123@postgres:5432/agpt_local?connect_timeout=60
networks:
- app-network
restart: on-failure
healthcheck:
test: ["CMD", "poetry", "run", "prisma", "migrate", "status"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:latest
command: redis-server --requirepass password
ports:
- "6379:6379"
networks:
- app-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
rest_server:
build:
context: ../
dockerfile: rnd/autogpt_server/Dockerfile
target: server
command: ["python", "-m", "autogpt_server.rest"]
develop:
watch:
- path: ./
target: rnd/autogpt_server/
action: rebuild
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
migrate:
condition: service_completed_successfully
environment:
- DATABASE_URL=postgresql://agpt_user:pass123@postgres:5432/agpt_local?connect_timeout=60
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=password
- AUTH_ENABLED=false
- PYRO_HOST=0.0.0.0
- EXECUTIONMANAGER_HOST=executor
ports:
- "8000:8000"
- "8003:8003" # execution scheduler
networks:
- app-network
executor:
build:
context: ../
dockerfile: rnd/autogpt_server/Dockerfile
target: server
command: ["python", "-m", "autogpt_server.exec"]
develop:
watch:
- path: ./
target: rnd/autogpt_server/
action: rebuild
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
migrate:
condition: service_completed_successfully
environment:
- DATABASE_URL=postgresql://agpt_user:pass123@postgres:5432/agpt_local?connect_timeout=60
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=password
- AUTH_ENABLED=false
- PYRO_HOST=0.0.0.0
- AGENTSERVER_HOST=rest_server
ports:
- "8002:8000"
networks:
- app-network
websocket_server:
build:
context: ../
dockerfile: rnd/autogpt_server/Dockerfile
target: server
command: ["python", "-m", "autogpt_server.ws"]
develop:
watch:
- path: ./
target: rnd/autogpt_server/
action: rebuild
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
migrate:
condition: service_completed_successfully
environment:
- DATABASE_URL=postgresql://agpt_user:pass123@postgres:5432/agpt_local?connect_timeout=60
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=password
- AUTH_ENABLED=false
- PYRO_HOST=0.0.0.0
ports:
- "8001:8001"
networks:
- app-network
market:
build:
context: ../
dockerfile: rnd/market/Dockerfile
develop:
watch:
- path: ./
target: rnd/market/
action: rebuild
depends_on:
postgres:
condition: service_healthy
migrate:
condition: service_completed_successfully
environment:
- DATABASE_URL=postgresql://agpt_user:pass123@postgres:5432/agpt_local?connect_timeout=60&schema=market
ports:
- "8015:8015"
networks:
- app-network
frontend:
build:
context: ../
dockerfile: rnd/autogpt_builder/Dockerfile
target: dev
develop:
watch:
- path: ./
target: rnd/autogpt_builder/
action: rebuild
depends_on:
postgres:
condition: service_healthy
rest_server:
condition: service_started
websocket_server:
condition: service_started
migrate:
condition: service_completed_successfully
environment:
- DATABASE_URL=postgresql://agpt_user:pass123@postgres:5432/agpt_local?connect_timeout=60
- NEXT_PUBLIC_AGPT_SERVER_URL=http://localhost:8000/api
- NEXT_PUBLIC_AGPT_WS_SERVER_URL=ws://localhost:8001/ws
- NEXT_PUBLIC_AGPT_MARKETPLACE_URL=http://localhost:8015/api/v1/market
ports:
- "3000:3000"
networks:
- app-network
networks:
app-network:
driver: bridge