No description
- HTML 43.1%
- C# 39.8%
- CSS 13%
- TypeScript 2.3%
- JavaScript 1.4%
- Other 0.4%
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| .vscode | ||
| Components | ||
| Configuration | ||
| Domain | ||
| Properties | ||
| Services | ||
| tests/playwright | ||
| wwwroot | ||
| .dockerignore | ||
| .gitignore | ||
| appsettings.Development.json | ||
| appsettings.json | ||
| docker-compose.override.yml | ||
| docker-compose.tests.yml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| Dockerfile.playwright | ||
| nginx.conf | ||
| nlog.config | ||
| package.json | ||
| plan.md | ||
| playwright.config.ts | ||
| Program.cs | ||
| README.Docker.md | ||
| WorkTracker.csproj | ||
| WorkTracker.sln | ||
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. - 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
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.