erp-platform/api/Erp.Platform.DbMigrator.Dockerfile
2026-01-07 01:25:30 +03:00

67 lines
4.8 KiB
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
ENV DOTNET_NUGET_SIGNATURE_VERIFICATION=false
WORKDIR /app
COPY "modules/Erp.Languages/Erp.Languages.Application.Contracts/Erp.Languages.Application.Contracts.csproj" "modules/Erp.Languages/Erp.Languages.Application.Contracts/"
COPY "modules/Erp.Languages/Erp.Languages.Domain/Erp.Languages.Domain.csproj" "modules/Erp.Languages/Erp.Languages.Domain/"
COPY "modules/Erp.Languages/Erp.Languages.Domain.Shared/Erp.Languages.Domain.Shared.csproj" "modules/Erp.Languages/Erp.Languages.Domain.Shared/"
COPY "modules/Erp.Languages/Erp.Languages.EntityFrameworkCore/Erp.Languages.EntityFrameworkCore.csproj" "modules/Erp.Languages/Erp.Languages.EntityFrameworkCore/"
COPY "modules/Erp.MailQueue/Erp.MailQueue.csproj" "modules/Erp.MailQueue/"
COPY "modules/Erp.Notifications/Erp.Notifications.Application.Contracts/Erp.Notifications.Application.Contracts.csproj" "modules/Erp.Notifications/Erp.Notifications.Application.Contracts/"
COPY "modules/Erp.Notifications/Erp.Notifications.Domain/Erp.Notifications.Domain.csproj" "modules/Erp.Notifications/Erp.Notifications.Domain/"
COPY "modules/Erp.Notifications/Erp.Notifications.Domain.Shared/Erp.Notifications.Domain.Shared.csproj" "modules/Erp.Notifications/Erp.Notifications.Domain.Shared/"
COPY "modules/Erp.Notifications/Erp.Notifications.EntityFrameworkCore/Erp.Notifications.EntityFrameworkCore.csproj" "modules/Erp.Notifications/Erp.Notifications.EntityFrameworkCore/"
COPY "modules/Erp.Sender/Erp.Sender.csproj" "modules/Erp.Sender/"
COPY "modules/Erp.Settings/Erp.Settings.Application.Contracts/Erp.Settings.Application.Contracts.csproj" "modules/Erp.Settings/Erp.Settings.Application.Contracts/"
COPY "modules/Erp.Settings/Erp.Settings.Domain/Erp.Settings.Domain.csproj" "modules/Erp.Settings/Erp.Settings.Domain/"
COPY "modules/Erp.Settings/Erp.Settings.Domain.Shared/Erp.Settings.Domain.Shared.csproj" "modules/Erp.Settings/Erp.Settings.Domain.Shared/"
COPY "modules/Erp.Settings/Erp.Settings.EntityFrameworkCore/Erp.Settings.EntityFrameworkCore.csproj" "modules/Erp.Settings/Erp.Settings.EntityFrameworkCore/"
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Application.Contracts/Erp.SqlQueryManager.Application.Contracts.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Application.Contracts/"
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain/Erp.SqlQueryManager.Domain.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain/"
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain.Shared/Erp.SqlQueryManager.Domain.Shared.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.Domain.Shared/"
COPY "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.EntityFrameworkCore/Erp.SqlQueryManager.EntityFrameworkCore.csproj" "modules/Erp.SqlQueryManager/Erp.SqlQueryManager.EntityFrameworkCore/"
COPY "modules/Erp.Reports/Erp.Reports.Application.Contracts/Erp.Reports.Application.Contracts.csproj" "modules/Erp.Reports/Erp.Reports.Application.Contracts/"
COPY "modules/Erp.Reports/Erp.Reports.Domain/Erp.Reports.Domain.csproj" "modules/Erp.Reports/Erp.Reports.Domain/"
COPY "modules/Erp.Reports/Erp.Reports.Domain.Shared/Erp.Reports.Domain.Shared.csproj" "modules/Erp.Reports/Erp.Reports.Domain.Shared/"
COPY "modules/Erp.Reports/Erp.Reports.EntityFrameworkCore/Erp.Reports.EntityFrameworkCore.csproj" "modules/Erp.Reports/Erp.Reports.EntityFrameworkCore/"
COPY "src/Erp.Platform.Application.Contracts/Erp.Platform.Application.Contracts.csproj" "src/Erp.Platform.Application.Contracts/"
COPY "src/Erp.Platform.DbMigrator/Erp.Platform.DbMigrator.csproj" "src/Erp.Platform.DbMigrator/"
COPY "src/Erp.Platform.Domain/Erp.Platform.Domain.csproj" "src/Erp.Platform.Domain/"
COPY "src/Erp.Platform.Domain.Shared/Erp.Platform.Domain.Shared.csproj" "src/Erp.Platform.Domain.Shared/"
COPY "src/Erp.Platform.EntityFrameworkCore/Erp.Platform.EntityFrameworkCore.csproj" "src/Erp.Platform.EntityFrameworkCore/"
RUN dotnet restore "src/Erp.Platform.DbMigrator/Erp.Platform.DbMigrator.csproj"
COPY . .
RUN dotnet publish "src/Erp.Platform.DbMigrator/Erp.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 ["./Erp.Platform.DbMigrator"]