Files
AutoGPT/autogpt_platform/.devcontainer/docker-compose.devcontainer.yml
Otto-AGPT 582754256e feat(platform): Add GitHub Codespaces devcontainer for PR reviews
SECRT-1933

This adds a complete devcontainer configuration for the AutoGPT Platform,
optimized for PR reviews in GitHub Codespaces.

Features:
- Docker-in-Docker for full compose support
- Pre-installed Python 3.13, Node 21, pnpm, Poetry
- Auto-start of all platform services (Supabase, Redis, RabbitMQ, etc.)
- Pre-seeded test data with ready-to-use accounts
- VS Code extensions for Python, TypeScript, Prisma, Playwright
- Debug launch configs for backend and frontend
- Optimized for prebuilds (~60s spinup vs 5-10 min)

Test account: test123@gmail.com / testpassword123

Files:
- .devcontainer/devcontainer.json - Main configuration
- .devcontainer/docker-compose.devcontainer.yml - Compose overlay
- .devcontainer/scripts/ - Lifecycle scripts (oncreate, postcreate, poststart)
- .devcontainer/vscode-templates/ - Optional VS Code debug configs
- .devcontainer/README.md - Documentation
2026-02-11 16:37:30 +00:00

57 lines
2.1 KiB
YAML

# Docker Compose override for dev container
# This extends the main docker-compose.yml to add a dev container service
services:
devcontainer:
image: mcr.microsoft.com/devcontainers/base:ubuntu-24.04
volumes:
# Mount the entire AutoGPT repo (parent of autogpt_platform)
- ../..:/workspaces/AutoGPT:cached
# Docker-in-Docker socket
- /var/run/docker.sock:/var/run/docker-host.sock
# Keep container running
command: sleep infinity
# Use host network for easy access to other services
network_mode: host
environment:
# Codespaces detection
- CODESPACES=true
# Database - use localhost (host network mode)
- DATABASE_URL=postgresql://postgres:your-super-secret-and-long-postgres-password@localhost:5432/postgres?schema=platform&connect_timeout=60
- DIRECT_URL=postgresql://postgres:your-super-secret-and-long-postgres-password@localhost:5432/postgres?schema=platform&connect_timeout=60
- DB_HOST=localhost
- DB_PORT=5432
# Redis
- REDIS_HOST=localhost
- REDIS_PORT=6379
# RabbitMQ
- RABBITMQ_HOST=localhost
# Supabase
- SUPABASE_URL=http://localhost:8000
- SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q
- JWT_VERIFY_KEY=your-super-secret-jwt-token-with-at-least-32-characters-long
# Frontend URLs (Codespaces will rewrite these)
- NEXT_PUBLIC_SUPABASE_URL=http://localhost:8000
- NEXT_PUBLIC_AGPT_SERVER_URL=http://localhost:8006/api
- NEXT_PUBLIC_AGPT_WS_SERVER_URL=ws://localhost:8001/ws
# Backend URLs
- PLATFORM_BASE_URL=http://localhost:8000
- FRONTEND_BASE_URL=http://localhost:3000
# Disable telemetry in dev
- NEXT_TELEMETRY_DISABLED=1
- DO_NOT_TRACK=1
# Poetry
- POETRY_VIRTUALENVS_IN_PROJECT=true
- POETRY_NO_INTERACTION=1