fix: Move devcontainer to repo root for Codespaces detection

GitHub Codespaces only looks for devcontainer.json in:
- .devcontainer/devcontainer.json
- .devcontainer/<subfolder>/devcontainer.json
- .devcontainer.json

It does NOT look inside project subfolders like autogpt_platform/.devcontainer/

Moved to .devcontainer/platform/ which:
1. Will be detected by Codespaces
2. Allows multiple configs (platform vs classic)
3. Updated all path references accordingly
This commit is contained in:
Otto-AGPT
2026-02-11 16:51:03 +00:00
parent 7195f7e298
commit 4daa25e3dc
8 changed files with 8 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
{
"name": "AutoGPT Platform",
"dockerComposeFile": [
"../docker-compose.yml",
"../../autogpt_platform/docker-compose.yml",
"docker-compose.devcontainer.yml"
],
"service": "devcontainer",
@@ -24,15 +24,10 @@
}
},
// Lifecycle scripts
// onCreateCommand runs during prebuild - do heavy lifting here
"onCreateCommand": "bash .devcontainer/scripts/oncreate.sh",
// postCreateCommand runs after container creation - user-specific setup
"postCreateCommand": "bash .devcontainer/scripts/postcreate.sh",
// postStartCommand runs every time the container starts (including resume)
"postStartCommand": "bash .devcontainer/scripts/poststart.sh",
// Lifecycle scripts - paths relative to repo root
"onCreateCommand": "bash .devcontainer/platform/scripts/oncreate.sh",
"postCreateCommand": "bash .devcontainer/platform/scripts/postcreate.sh",
"postStartCommand": "bash .devcontainer/platform/scripts/poststart.sh",
// Port forwarding
"forwardPorts": [

View File

@@ -1,11 +1,11 @@
# Docker Compose override for dev container
# This extends the main docker-compose.yml to add a dev container service
# This extends the main autogpt_platform/docker-compose.yml
services:
devcontainer:
image: mcr.microsoft.com/devcontainers/base:ubuntu-24.04
volumes:
# Mount the entire AutoGPT repo (parent of autogpt_platform)
# Mount the entire AutoGPT repo
- ../..:/workspaces/AutoGPT:cached
# Docker-in-Docker socket
- /var/run/docker.sock:/var/run/docker-host.sock
@@ -38,7 +38,7 @@ services:
- 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)
# Frontend URLs
- 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