33 lines
1.2 KiB
Docker
33 lines
1.2 KiB
Docker
FROM mcr.microsoft.com/dotnet/aspnet:10.0-preview AS base
|
|
RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
|
|
WORKDIR /app
|
|
EXPOSE 8080
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:10.0-preview AS build
|
|
WORKDIR /src
|
|
COPY BudgetApp/BudgetApp.csproj BudgetApp/
|
|
RUN dotnet restore BudgetApp/BudgetApp.csproj
|
|
COPY BudgetApp/ BudgetApp/
|
|
WORKDIR /src/BudgetApp
|
|
RUN dotnet publish -c Release -o /app/publish
|
|
|
|
FROM base AS final
|
|
WORKDIR /app
|
|
COPY --from=build /app/publish .
|
|
|
|
LABEL org.opencontainers.image.title="Budgeteer" \
|
|
org.opencontainers.image.description="A personal finance dashboard built with Blazor Server (.NET 10). Multi-account support, recurring transactions, category management, balance trend charts, and ASP.NET Identity authentication." \
|
|
org.opencontainers.image.url="https://github.com/edgeofsanity76/Budgeteer" \
|
|
org.opencontainers.image.source="https://github.com/edgeofsanity76/Budgeteer" \
|
|
org.opencontainers.image.licenses="MIT"
|
|
|
|
# Ensure the SQLite data directory exists and is writable
|
|
RUN mkdir -p /app/data
|
|
|
|
# Store the database in the volume-mountable /app/data directory
|
|
ENV ConnectionStrings__DefaultConnection="Data Source=/app/data/budgetapp.db"
|
|
|
|
VOLUME ["/app/data"]
|
|
|
|
ENTRYPOINT ["dotnet", "BudgetApp.dll"]
|