Skip to content

Commit e08342a

Browse files
committed
Fix devcontainer config
1 parent 43f8829 commit e08342a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
"DB_URL": "mongodb://localhost:27017/",
3030
"DB_NAME": "farm_intro"
3131
},
32-
"postCreateCommand": "pip install -r backend/requirements.txt && cd frontend && npm install",
33-
"postStartCommand": "echo 'Backend: DB_URL=mongodb://localhost:27017/ DB_NAME=farm_intro uvicorn main:app --reload (from backend/)'"
32+
"postCreateCommand": "pip install -r backend/requirements.txt && cd frontend && npm ci",
33+
"postStartCommand": "echo 'Services ready: MongoDB local on 27017. Backend and frontend start automatically after attach.'",
34+
"postAttachCommand": {
35+
"backend": "cd backend && DEBUG_MODE=true uvicorn main:app --host 0.0.0.0 --port 8000 --reload",
36+
"frontend": "cd frontend && HOST=0.0.0.0 npm start"
37+
}
3438
}

0 commit comments

Comments
 (0)