Files
Budgeteer/Dockerfile
T

41 lines
1.6 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"
# SSO / OAuth provider configuration (override at runtime with your credentials)
ENV Authentication__Google__ClientId="" \
Authentication__Google__ClientSecret="" \
Authentication__Microsoft__ClientId="" \
Authentication__Microsoft__ClientSecret="" \
Authentication__Facebook__ClientId="" \
Authentication__Facebook__ClientSecret=""
VOLUME ["/app/data"]
ENTRYPOINT ["dotnet", "BudgetApp.dll"]