2.2 KiB
2.2 KiB
Running and debugging with Docker or local Couchbase Lite storage
Quick run (Docker Engine required):
-
Build and start services:
docker compose up --build
-
App will be available on host port 8002 -> container 8080 (http://localhost:8002).
Docker persistence:
- The app now uses an embedded Couchbase Lite database stored under
/data/couchbaseinside the container. - The compose file mounts that path from
${WORKTRACKER_DATA_PATH:-./.docker-data/couchbase}on the host. - Set
WORKTRACKER_DATA_PATHbeforedocker compose upif you want to move the database elsewhere.
Development in VS Code without Docker:
- Use the
WorkTracker: Debug Locallaunch 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-devby default.
Development in Docker:
- The override file keeps a containerized
dotnet watchflow for cases where you still want Docker. - The development container mounts the workspace into
/workspaceand stores its Couchbase Lite files under./.docker-data/couchbase-devon the host.
Debugging in Docker from VS Code:
- Use the
WorkTracker: Debug in Dockerlaunch configuration. - VS Code brings up the development container with
docker compose, builds the app inDebug, and launchesWorkTracker.dllundervsdbginside the container. - When the app reports that it is listening, VS Code automatically opens Microsoft Edge in browser debug mode against http://localhost:8002.
- The app remains available at http://localhost:8002 while the debugger is attached.
- Stopping the debug session runs
docker compose downfor the debug stack.
Manual development start:
docker compose up --build
Manual shutdown:
docker compose down
Notes:
- 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 uses the .NET 10
*-nobleimages so local builds and container builds stay aligned with the SDK available in VS Code.