Skip to content

Make documented local backend startup work#27

Open
hiboydidi wants to merge 1 commit into
CloakHQ:mainfrom
hiboydidi:fix-local-backend-startup
Open

Make documented local backend startup work#27
hiboydidi wants to merge 1 commit into
CloakHQ:mainfrom
hiboydidi:fix-local-backend-startup

Conversation

@hiboydidi
Copy link
Copy Markdown

Summary\n- allow backend modules to import both as package modules and via uvicorn main:app from backend/\n- fall back to backend/.data for local development when Docker's /data path is not writable\n- document the local data directory override and ignore generated local data\n- harden the CDP port exhaustion test against real local services using ports in the tested range\n\n## Verification\n- python -m pytest -q (182 passed)\n- uvicorn main:app --port 8081 then GET /api/status returned JSON\n\n## Note\nDirect push to origin failed because the logged-in GitHub account has READ permission on CloakHQ/CloakBrowser-Manager, so this branch was pushed to the fork instead.

The README tells developers to run uvicorn from the backend directory, but importing main as a top-level module broke package-relative imports. Local macOS development also cannot rely on the Docker-only /data mount, so startup now falls back to an ignored backend data directory when /data is not writable while preserving /data for Docker.

Constraint: README documents uvicorn main:app from backend/

Constraint: Docker deployment persists profiles at /data

Rejected: Change README to backend.main:app only | would leave the documented backend-directory workflow less convenient and still not solve local /data startup

Confidence: high

Scope-risk: narrow

Directive: Keep Docker default storage at /data unless the container contract changes

Tested: python -m pytest -q (182 passed)

Tested: uvicorn main:app --port 8081 responded on /api/status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant