34 lines
989 B
YAML
34 lines
989 B
YAML
# Dev-sidecar compose: app container only (no database service).
|
|
# Used by .devcontainer/devcontainer.json via dockerComposeFile.
|
|
# Development uses SQLite — no Docker-in-Docker database needed.
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: .devcontainer/Dockerfile
|
|
restart: "no"
|
|
ports:
|
|
- "8000:8000" # FastAPI
|
|
- "4200:4200" # Angular dev server
|
|
environment:
|
|
KMTN_DATABASE_URL: sqlite+aiosqlite:///./backend/kmountain.db
|
|
KMTN_CORS_ORIGINS: '["http://localhost:4200"]'
|
|
volumes:
|
|
- ..:/workspaces/web_app:cached
|
|
- node_modules:/workspaces/web_app/node_modules
|
|
- backend_venv:/app/.venv
|
|
command: >
|
|
sh -c "
|
|
pip install -r backend/requirements.txt &&
|
|
cd backend &&
|
|
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload &
|
|
cd /workspaces/web_app &&
|
|
npm install &&
|
|
npx ng serve --host 0.0.0.0 --port 4200
|
|
"
|
|
|
|
volumes:
|
|
node_modules:
|
|
backend_venv:
|