Files
using.cash/Dockerfile
T
rick 8aafe681b1
CI / docker (push) Has been cancelled
CI / build-and-test (push) Has been cancelled
Scaffold v6 solution, frontend, CI, and Docker
Section 1 complete (tasks 1.1-1.7):
- .NET 8 solution with 8 projects (Common, Basic, Database, Logic, Api,
  Backend, Migration, Tests) and correct dependency graph
- NuGet deps: MySqlConnector, NBitcoin, Microsoft.Extensions.Hosting,
  xunit, coverlet
- Common layer: IHasIdentity, enums (Permission, FinancialAccountType,
  DocumentType, CryptoChain, ExpenseClaimStatus, InvoiceStatus,
  PayoutStatus, FinancialDependencyType)
- React + TypeScript + Vite frontend with MUI, react-router, react-i18next
- Localization: EN, SV, DE translation files
- Vite builds to src/UsingCash.Api/wwwroot for static serving
- Multi-stage Dockerfile: Node build + .NET build -> aspnet runtime
- Gitea Actions CI: build, test, lint, Docker image
- appsettings.json with read/write/admin DB credential structure

Also updates data-migration spec/design for mysqldump-based workflow.

Made-with: Cursor
2026-04-08 16:21:00 +02:00

32 lines
1.3 KiB
Docker

FROM node:20-slim AS frontend-build
WORKDIR /app/frontend
COPY frontend/package.json frontend/package-lock.json ./
RUN npm ci
COPY frontend/ ./
RUN npm run build
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS backend-build
WORKDIR /app
COPY src/*.sln src/
COPY src/UsingCash.Common/*.csproj src/UsingCash.Common/
COPY src/UsingCash.Basic/*.csproj src/UsingCash.Basic/
COPY src/UsingCash.Database/*.csproj src/UsingCash.Database/
COPY src/UsingCash.Logic/*.csproj src/UsingCash.Logic/
COPY src/UsingCash.Api/*.csproj src/UsingCash.Api/
COPY src/UsingCash.Backend/*.csproj src/UsingCash.Backend/
COPY src/UsingCash.Migration/*.csproj src/UsingCash.Migration/
COPY src/UsingCash.Tests/*.csproj src/UsingCash.Tests/
RUN dotnet restore src/UsingCash.sln
COPY src/ src/
COPY --from=frontend-build /app/src/UsingCash.Api/wwwroot src/UsingCash.Api/wwwroot/
RUN dotnet publish src/UsingCash.Api/UsingCash.Api.csproj -c Release -o /app/publish --no-restore
RUN dotnet publish src/UsingCash.Migration/UsingCash.Migration.csproj -c Release -o /app/migration --no-restore
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
WORKDIR /app
COPY --from=backend-build /app/publish .
COPY --from=backend-build /app/migration /app/migration/
EXPOSE 5000
ENV ASPNETCORE_URLS=http://+:5000
ENTRYPOINT ["dotnet", "UsingCash.Api.dll"]