Add CalendarEventDocument and CalendarEventType enum for event management Update WorkDayDocument to include WorkUnitDocument and CalendarEventDocument lists Enhance CouchbaseLiteWorkDayService with methods for managing WorkUnit and CalendarEvent Revise MonthlySummaryModel to track preview worked hours and counted work units Improve CSS for calendar view, including responsive design and new item styles
3.1 KiB
3.1 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).
Authentication mode:
- Authentication is disabled by default and every request runs as the configured default admin user. This is intended for deployments fronted by Cloudflare Zero Trust.
- Re-enable the built-in login flow by setting
AppAuth__Enabled=trueor changingAppAuth:Enabledtotruein appsettings.json. - The default admin identity used while auth is disabled is configured under
AppAuth:DefaultUsernameandAppAuth:DefaultUserId.
Health endpoint:
GET /healthzreturns JSON health information, including whether built-in authentication is enabled and whether the Couchbase Lite collections initialized correctly.
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. - VS Code waits for the app to report that it is listening before opening 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
Docker Playwright smoke tests:
- Run
docker compose -f docker-compose.yml -f docker-compose.tests.yml up --build --abort-on-container-exit --exit-code-from playwright playwright - The suite starts the app in Docker, waits for
/healthz, and verifies that protected pages load without a login screen.
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.