Migrate from MongoDB to Couchbase Lite for local storage; update related services and configurations
Some checks failed
Publish Container / publish (push) Failing after 3m43s

This commit is contained in:
Maddo 2026-03-17 13:53:33 +01:00
commit f976d70db8
24 changed files with 328 additions and 218 deletions

View file

@ -1,4 +1,4 @@
Running and debugging with Docker (includes MongoDB)
Running and debugging with Docker or local Couchbase Lite storage
Quick run (Docker Engine required):
@ -8,12 +8,22 @@ Quick run (Docker Engine required):
2. App will be available on host port 8002 -> container 8080 (http://localhost:8002).
Development in VS Code (F5):
Docker persistence:
- The repository uses `docker-compose.yml` plus `docker-compose.override.yml` as the single development stack.
- The override file switches the app container to the SDK-based `dev` image, mounts the workspace into `/workspace`, installs `vsdbg`, and runs `dotnet watch`.
- Press F5 in VS Code with the `Docker: Attach .NET in Compose - F5` configuration selected.
- VS Code starts Docker Compose, waits for `http://localhost:8002`, opens the browser, and attaches the debugger to the `worktracker-dev` container.
- The app now uses an embedded Couchbase Lite database stored under `/data/couchbase` inside the container.
- The compose file mounts that path from `${WORKTRACKER_DATA_PATH:-./.docker-data/couchbase}` on the host.
- Set `WORKTRACKER_DATA_PATH` before `docker compose up` if you want to move the database elsewhere.
Development in VS Code without Docker:
- Use the `WorkTracker: Debug Local` launch configuration.
- VS Code builds the project, starts the app directly with `ASPNETCORE_ENVIRONMENT=Development`, and opens the local URL when the server is ready.
- Local development data is stored in `App_Data/couchbase-dev` by default.
Development in Docker:
- The override file keeps a containerized `dotnet watch` flow for cases where you still want Docker.
- The development container mounts the workspace into `/workspace` and stores its Couchbase Lite files under `./.docker-data/couchbase-dev` on the host.
Manual development start:
@ -23,13 +33,8 @@ Manual shutdown:
- `docker compose down`
MongoDB:
- The compose stack includes a `mongo` service and a named volume `mongo_data` for persistence.
- The app uses `MongoDb__ConnectionString: mongodb://mongo:27017` inside the compose network.
Notes:
- The base compose file remains production-oriented; the override file is the development/debug layer that VS Code uses automatically.
- The base compose file remains production-oriented; the override file is the optional containerized development layer.
- The first container build takes longer because the dev image installs the .NET debugger.
- The Dockerfile pins the .NET 10 images to the `*-noble` tags because the generic `10.0` SDK tag does not provide a usable SDK in this environment.
- The Dockerfile uses the .NET 9 `*-noble` images so local builds and container builds stay aligned with the SDK available in VS Code.