fix: improve development environment and audio debugging
- Fix docker-compose.dev.yml to use development targets instead of production - Update dev:full task to properly build containers and start all services - Add dev:clean task for environment cleanup - Add dev:audio-debug task for focused audio debugging - Enhance audio service with development mode detection and debugging - Update DEV_SERVICES to include web service These changes resolve issues with glitchy audio playback in development by: 1. Using proper development targets with hot reload 2. Ensuring proper build steps before starting services 3. Adding debugging capabilities for audio issues 4. Providing better development environment management
This commit is contained in:
30
Taskfile.yml
30
Taskfile.yml
@@ -3,7 +3,7 @@ version: "3"
|
||||
vars:
|
||||
COMPOSE: docker compose
|
||||
DEV_FLAGS: -f docker-compose.yml -f docker-compose.dev.yml
|
||||
DEV_SERVICES: db redis api audio-worker nc-watcher
|
||||
DEV_SERVICES: db redis api web audio-worker nc-watcher
|
||||
|
||||
# ── Production ────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -55,12 +55,12 @@ tasks:
|
||||
dev:full:
|
||||
desc: Start complete development server (backend + frontend) with follow logs
|
||||
cmds:
|
||||
- echo "Building development containers..."
|
||||
- "{{.COMPOSE}} {{.DEV_FLAGS}} build api web"
|
||||
- echo "Starting development environment..."
|
||||
- "{{.COMPOSE}} {{.DEV_FLAGS}} up -d {{.DEV_SERVICES}}"
|
||||
- echo "Starting frontend development server..."
|
||||
- cd web && npm run dev &
|
||||
- echo "Following backend logs... (Ctrl+C to stop)"
|
||||
- "{{.COMPOSE}} {{.DEV_FLAGS}} logs -f api audio-worker nc-watcher"
|
||||
- "{{.COMPOSE}} {{.DEV_FLAGS}} up -d {{.DEV_SERVICES}} web"
|
||||
- echo "Following all logs... (Ctrl+C to stop)"
|
||||
- "{{.COMPOSE}} {{.DEV_FLAGS}} logs -f api web audio-worker nc-watcher"
|
||||
|
||||
dev:logs:
|
||||
desc: Follow logs in dev mode
|
||||
@@ -72,6 +72,24 @@ tasks:
|
||||
cmds:
|
||||
- "{{.COMPOSE}} {{.DEV_FLAGS}} restart {{.SERVICE}}"
|
||||
|
||||
dev:clean:
|
||||
desc: Clean up development environment and rebuild
|
||||
cmds:
|
||||
- echo "Stopping development services..."
|
||||
- "{{.COMPOSE}} {{.DEV_FLAGS}} down -v"
|
||||
- echo "Removing old containers and volumes..."
|
||||
- docker system prune -f
|
||||
- echo "Development environment cleaned"
|
||||
|
||||
dev:audio-debug:
|
||||
desc: Start development with audio debugging enabled
|
||||
cmds:
|
||||
- echo "Starting development with audio debugging..."
|
||||
- "{{.COMPOSE}} {{.DEV_FLAGS}} build api web"
|
||||
- "{{.COMPOSE}} {{.DEV_FLAGS}} up -d {{.DEV_SERVICES}}"
|
||||
- echo "Audio service logs with debugging..."
|
||||
- "{{.COMPOSE}} {{.DEV_FLAGS}} logs -f api web"
|
||||
|
||||
# ── Database ──────────────────────────────────────────────────────────────────
|
||||
|
||||
migrate:
|
||||
|
||||
Reference in New Issue
Block a user