Some checks failed
Publish Container / publish (push) Has been cancelled
- Removed Entity Framework Core identity schema and related migrations. - Introduced MongoDB-based authentication service with user seeding functionality. - Updated Program.cs to configure authentication and authorization using cookies. - Created new Login.razor component for user login interface. - Added RedirectToLogin component for handling unauthorized access. - Updated Dockerfile and docker-compose files for development and production environments. - Removed SQLite connection strings and related configurations. - Added MongoDB connection settings in appsettings.json and Docker configurations. - Implemented IMongoAuthService interface and MongoAuthService class for user management. - Created MongoAuthUser model for MongoDB user representation.
1.4 KiB
1.4 KiB
Running and debugging with Docker (includes MongoDB)
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).
Development in VS Code (F5):
- The repository uses
docker-compose.ymlplusdocker-compose.override.ymlas the single development stack. - The override file switches the app container to the SDK-based
devimage, mounts the workspace into/workspace, installsvsdbg, and runsdotnet watch. - Press F5 in VS Code with the
Docker: Attach .NET in Compose - F5configuration selected. - VS Code starts Docker Compose, waits for
http://localhost:8002, opens the browser, and attaches the debugger to theworktracker-devcontainer.
Manual development start:
docker compose up --build
Manual shutdown:
docker compose down
MongoDB:
- The compose stack includes a
mongoservice and a named volumemongo_datafor persistence. - The app uses
MongoDb__ConnectionString: mongodb://mongo:27017inside 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 first container build takes longer because the dev image installs the .NET debugger.
- The Dockerfile pins the .NET 10 images to the
*-nobletags because the generic10.0SDK tag does not provide a usable SDK in this environment.