feat: add devcontainer for local setup

This commit is contained in:
Abhishek Kumar 2026-05-25 15:58:26 +05:30
parent a725fda274
commit 6b33addb25
26 changed files with 671 additions and 130 deletions

17
api/.env.test.example Normal file
View file

@ -0,0 +1,17 @@
# Test environment. Read by pytest runs and the "Tests: API" launch
# configurations in .vscode/launch.json.
#
# Tests target a separate database (`test_db`) so they don't clobber dev
# data. Create it once after the postgres container is up:
# docker compose -f docker-compose-local.yaml exec postgres \
# createdb -U postgres test_db
ENVIRONMENT="test"
LOG_LEVEL="DEBUG"
UI_APP_URL=http://localhost:3000
DATABASE_URL="postgresql+asyncpg://postgres:postgres@localhost:5432/test_db"
REDIS_URL="redis://:redissecret@localhost:6379/0"
MINIO_PUBLIC_ENDPOINT=http://localhost:9000

View file

@ -1,6 +1,6 @@
# Multi-stage Dockerfile
# Stage 1: Builder - Install Python dependencies
FROM python:3.12-slim AS builder
FROM python:3.13-slim AS builder
WORKDIR /app
@ -56,7 +56,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
&& chmod +x /usr/local/bin/ffmpeg /usr/local/bin/ffprobe
# Stage 4: Runtime - Minimal image with only runtime dependencies
FROM python:3.12-slim AS runner
FROM python:3.13-slim AS runner
WORKDIR /app
@ -65,7 +65,7 @@ COPY --from=ffmpeg-static /usr/local/bin/ffmpeg /usr/local/bin/ffmpeg
COPY --from=ffmpeg-static /usr/local/bin/ffprobe /usr/local/bin/ffprobe
# Node.js 22 binary only (ts_validator subprocess needs node >=22.6 for
# native TypeScript stripping; see api/mcp_server/ts_bridge.py). python:3.12-slim
# native TypeScript stripping; see api/mcp_server/ts_bridge.py). python:3.13-slim
# already provides libstdc++6, libgcc-s1, and ca-certificates that node needs.
COPY --from=node:22-slim /usr/local/bin/node /usr/local/bin/node
@ -104,4 +104,4 @@ ENV LOG_TO_FILE=false
EXPOSE 8000
# Run the FastAPI app with uvicorn
CMD ["./scripts/start_services_docker.sh"]
CMD ["./scripts/start_services_docker.sh"]

View file

@ -2,4 +2,4 @@
name = "dograh-api"
version = "1.31.0"
description = "Backend API for Dograh voice AI platform"
requires-python = ">=3.12"
requires-python = ">=3.13,<3.14"

View file

@ -2,4 +2,3 @@ mypy==2.0.0
watchfiles==1.1.1
datamodel-code-generator==0.56.1
twine==6.2.0
-e ./sdk/python