26b13f6dbf
New internal service that centralises SMTP email sending. - email-api-models: SendEmailRequest DTO, IEmailApiClient Refit interface, EmailApiSettings - email-api: SmtpEmailDispatcher (MailKit), EmailController (POST /api/email/send), branded HTML shell wrapper, shared-Files-volume attachment support - Protected by X-Internal-Api-Key via UseInternalApiKeyProtection() - No exposed Docker port — internal network only (http://email-api:8080) Closes #22 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
1.1 KiB
Docker
32 lines
1.1 KiB
Docker
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
|
ARG BUILD_CONFIGURATION=Release
|
|
WORKDIR /src
|
|
|
|
COPY Apis/email-api/email-api.csproj Apis/email-api/
|
|
COPY Apis/email-api-models/email-api-models.csproj Apis/email-api-models/
|
|
COPY Apis/api-models/api-models.csproj Apis/api-models/
|
|
COPY Apis/common/common.csproj Apis/common/
|
|
COPY Helpers/common-helpers/common-helpers.csproj Helpers/common-helpers/
|
|
COPY Helpers/startup-helpers/startup-helpers.csproj Helpers/startup-helpers/
|
|
COPY Directory.Packages.props ./
|
|
|
|
RUN dotnet restore Apis/email-api/email-api.csproj
|
|
|
|
COPY Apis/email-api/ Apis/email-api/
|
|
COPY Apis/email-api-models/ Apis/email-api-models/
|
|
COPY Apis/api-models/ Apis/api-models/
|
|
COPY Apis/common/ Apis/common/
|
|
COPY Helpers/common-helpers/ Helpers/common-helpers/
|
|
COPY Helpers/startup-helpers/ Helpers/startup-helpers/
|
|
|
|
RUN dotnet publish Apis/email-api/email-api.csproj -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS final
|
|
WORKDIR /app
|
|
EXPOSE 8080
|
|
ENV ASPNETCORE_URLS=http://0.0.0.0:8080
|
|
|
|
COPY --from=build /app/publish .
|
|
|
|
ENTRYPOINT ["dotnet", "email-api.dll"]
|