# Development overlay (hot reload). Usage: # docker compose -f docker-compose.yml -f docker-compose.dev.yml up # Or run only postgres in Docker and uvicorn/vite on the host: # docker compose -f docker-compose.yml -f docker-compose.dev.yml up postgres services: postgres: ports: - "5432:5432" # reachable from a host-run uvicorn api: command: [ "uvicorn", "app.main:app", "--reload", "--host", "0.0.0.0", "--port", "8000", ] volumes: - ./apps/api/app:/srv/app environment: LIFETRACK_CORS_ORIGINS: '["http://localhost:5173"]' # The published port comes from the base file (API_PORT, default 8000): # re-declaring it here would publish the API twice. web: build: context: . dockerfile: docker/web.Dockerfile target: build # stop at the node stage (deps installed, no nginx) image: lifetrack-web-dev working_dir: /build command: ["npm", "run", "dev", "--", "--host", "0.0.0.0", "--port", "5173"] # No nginx in this stage: the vite dev server proxies /api itself # (apps/web/vite.config.ts), so the image healthcheck does not apply. healthcheck: disable: true volumes: - ./apps/web/src:/build/src - ./apps/web/index.html:/build/index.html - ./apps/web/vite.config.ts:/build/vite.config.ts - ./apps/web/tailwind.config.ts:/build/tailwind.config.ts - ./apps/web/postcss.config.js:/build/postcss.config.js - ./apps/web/tsconfig.json:/build/tsconfig.json ports: - "5173:5173"