Fix category shadow foreign keys and .NET 10 Docker build context
Build MoneyMap image / build-and-push (push) Failing after 7s
Build MoneyMap image / build-and-push (push) Failing after 7s
This commit is contained in:
@@ -1801,6 +1801,34 @@ var importer = new TransactionImporter(mockDb.Object, mockCardResolver.Object);
|
||||
|
||||
## Deployment
|
||||
|
||||
### Docker image build (.NET 10)
|
||||
|
||||
Run from the repository root (not `MoneyMap/`):
|
||||
|
||||
```bash
|
||||
docker build -f MoneyMap/Dockerfile -t moneymap:local .
|
||||
```
|
||||
|
||||
The Dockerfile uses the .NET 10 SDK and ASP.NET Core 10 runtime. The root
|
||||
context is required to copy `MoneyMap.sln` and the shared `MoneyMap.Core`
|
||||
project. The root `.dockerignore` excludes local build output, receipts,
|
||||
database files, and all `appsettings*.json`/credential files. Supply runtime
|
||||
configuration separately via environment variables (for example
|
||||
`ConnectionStrings__MoneyMapDb`, `OPENAI_API_KEY`) or a mounted
|
||||
configuration file; credentials are not baked into the image. Building does
|
||||
not start the application or apply migrations.
|
||||
|
||||
### Category relationship mapping
|
||||
|
||||
`Transaction.Category` and `CategoryMapping.Category` remain string category
|
||||
names. The corresponding collections on `Category` are `[NotMapped]` so EF
|
||||
cannot infer nonexistent `CategoryId` shadow foreign keys. The real
|
||||
`RecurringPlace.CategoryId` and parent/child category relationships remain
|
||||
mapped. This is a model correction only, with no database schema change or
|
||||
migration required. SQL Server model/query regression tests compile both
|
||||
receipt duplicate-check queries without connecting to a database.
|
||||
|
||||
|
||||
### Database Migration
|
||||
```bash
|
||||
# Create migration
|
||||
|
||||
Reference in New Issue
Block a user