sozsoft-platform/api/Sozsoft.Platform.DbMigrator.Dockerfile

64 lines
4.7 KiB
Text
Raw Normal View History

2026-02-24 20:44:16 +00:00
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
ENV DOTNET_NUGET_SIGNATURE_VERIFICATION=false
WORKDIR /app
COPY "modules/Sozsoft.Languages/Sozsoft.Languages.Application.Contracts/Sozsoft.Languages.Application.Contracts.csproj" "modules/Sozsoft.Languages/Sozsoft.Languages.Application.Contracts/"
COPY "modules/Sozsoft.Languages/Sozsoft.Languages.Domain/Sozsoft.Languages.Domain.csproj" "modules/Sozsoft.Languages/Sozsoft.Languages.Domain/"
COPY "modules/Sozsoft.Languages/Sozsoft.Languages.Domain.Shared/Sozsoft.Languages.Domain.Shared.csproj" "modules/Sozsoft.Languages/Sozsoft.Languages.Domain.Shared/"
COPY "modules/Sozsoft.Languages/Sozsoft.Languages.EntityFrameworkCore/Sozsoft.Languages.EntityFrameworkCore.csproj" "modules/Sozsoft.Languages/Sozsoft.Languages.EntityFrameworkCore/"
COPY "modules/Sozsoft.MailQueue/Sozsoft.MailQueue.csproj" "modules/Sozsoft.MailQueue/"
COPY "modules/Sozsoft.Notifications/Sozsoft.Notifications.Application.Contracts/Sozsoft.Notifications.Application.Contracts.csproj" "modules/Sozsoft.Notifications/Sozsoft.Notifications.Application.Contracts/"
COPY "modules/Sozsoft.Notifications/Sozsoft.Notifications.Domain/Sozsoft.Notifications.Domain.csproj" "modules/Sozsoft.Notifications/Sozsoft.Notifications.Domain/"
COPY "modules/Sozsoft.Notifications/Sozsoft.Notifications.Domain.Shared/Sozsoft.Notifications.Domain.Shared.csproj" "modules/Sozsoft.Notifications/Sozsoft.Notifications.Domain.Shared/"
COPY "modules/Sozsoft.Notifications/Sozsoft.Notifications.EntityFrameworkCore/Sozsoft.Notifications.EntityFrameworkCore.csproj" "modules/Sozsoft.Notifications/Sozsoft.Notifications.EntityFrameworkCore/"
COPY "modules/Sozsoft.Sender/Sozsoft.Sender.csproj" "modules/Sozsoft.Sender/"
COPY "modules/Sozsoft.Settings/Sozsoft.Settings.Application.Contracts/Sozsoft.Settings.Application.Contracts.csproj" "modules/Sozsoft.Settings/Sozsoft.Settings.Application.Contracts/"
COPY "modules/Sozsoft.Settings/Sozsoft.Settings.Domain/Sozsoft.Settings.Domain.csproj" "modules/Sozsoft.Settings/Sozsoft.Settings.Domain/"
COPY "modules/Sozsoft.Settings/Sozsoft.Settings.Domain.Shared/Sozsoft.Settings.Domain.Shared.csproj" "modules/Sozsoft.Settings/Sozsoft.Settings.Domain.Shared/"
COPY "modules/Sozsoft.Settings/Sozsoft.Settings.EntityFrameworkCore/Sozsoft.Settings.EntityFrameworkCore.csproj" "modules/Sozsoft.Settings/Sozsoft.Settings.EntityFrameworkCore/"
COPY "modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/Sozsoft.SqlQueryManager.Application.Contracts.csproj" "modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Application.Contracts/"
COPY "modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Domain/Sozsoft.SqlQueryManager.Domain.csproj" "modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Domain/"
COPY "modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Domain.Shared/Sozsoft.SqlQueryManager.Domain.Shared.csproj" "modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.Domain.Shared/"
COPY "modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.EntityFrameworkCore/Sozsoft.SqlQueryManager.EntityFrameworkCore.csproj" "modules/Sozsoft.SqlQueryManager/Sozsoft.SqlQueryManager.EntityFrameworkCore/"
COPY "src/Sozsoft.Platform.Application.Contracts/Sozsoft.Platform.Application.Contracts.csproj" "src/Sozsoft.Platform.Application.Contracts/"
COPY "src/Sozsoft.Platform.DbMigrator/Sozsoft.Platform.DbMigrator.csproj" "src/Sozsoft.Platform.DbMigrator/"
COPY "src/Sozsoft.Platform.Domain/Sozsoft.Platform.Domain.csproj" "src/Sozsoft.Platform.Domain/"
COPY "src/Sozsoft.Platform.Domain.Shared/Sozsoft.Platform.Domain.Shared.csproj" "src/Sozsoft.Platform.Domain.Shared/"
COPY "src/Sozsoft.Platform.EntityFrameworkCore/Sozsoft.Platform.EntityFrameworkCore.csproj" "src/Sozsoft.Platform.EntityFrameworkCore/"
RUN dotnet restore "src/Sozsoft.Platform.DbMigrator/Sozsoft.Platform.DbMigrator.csproj"
COPY . .
RUN dotnet publish "src/Sozsoft.Platform.DbMigrator/Sozsoft.Platform.DbMigrator.csproj" -c Release -o /app/publish --no-restore
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine AS final
# DevExpress License Key - runtime'da da gerekli
ARG DevExpress_License
ENV DevExpress_License=$DevExpress_License
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
LC_ALL=tr_TR.UTF-8 \
LANG=tr_TR.UTF-8
# DevExpress lisans dosyasını oluştur (runtime için)
RUN mkdir -p $HOME/.config/DevExpress && \
if [ -n "$DevExpress_License" ]; then \
echo "$DevExpress_License" > $HOME/.config/DevExpress/DevExpress_License.txt; \
fi
# icu'lar dotnet culture icin gerekli
# lib'ler wkhtmltopdf icin gerekli
RUN apk update
RUN apk add --no-cache \
icu-data-full \
icu-libs \
libgdiplus \
libc6-compat \
libc-dev
WORKDIR /srv/app
COPY --from=build /app/publish .
ENTRYPOINT ["./Sozsoft.Platform.DbMigrator"]