diff --git a/api/.gitignore b/api/.gitignore index 862e1dd3..f76a44c7 100644 --- a/api/.gitignore +++ b/api/.gitignore @@ -263,4 +263,8 @@ src/Erp.Platform.Blazor.Server.Tiered/Logs/* # Use abp install-libs to restore. **/wwwroot/libs/* -*appsettings.development.json \ No newline at end of file +*appsettings.development.json + +# DevExpress License - DO NOT commit to repository +**/DevExpress_License.txt +DevExpress_License.txt \ No newline at end of file diff --git a/api/Erp.Platform.DbMigrator.Dockerfile b/api/Erp.Platform.DbMigrator.Dockerfile index 26427d8c..5199ff70 100644 --- a/api/Erp.Platform.DbMigrator.Dockerfile +++ b/api/Erp.Platform.DbMigrator.Dockerfile @@ -35,10 +35,21 @@ 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 diff --git a/api/Erp.Platform.HttpApi.Host.Dockerfile b/api/Erp.Platform.HttpApi.Host.Dockerfile index e48d9d85..2bc44a2f 100644 --- a/api/Erp.Platform.HttpApi.Host.Dockerfile +++ b/api/Erp.Platform.HttpApi.Host.Dockerfile @@ -58,10 +58,21 @@ RUN mkdir -p publish RUN dotnet publish "src/Erp.Platform.HttpApi.Host/Erp.Platform.HttpApi.Host.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 diff --git a/configs/deployment/scripts/build/api.sh b/configs/deployment/scripts/build/api.sh index 3d409770..37d9ef33 100644 --- a/configs/deployment/scripts/build/api.sh +++ b/configs/deployment/scripts/build/api.sh @@ -9,7 +9,11 @@ VERSION=$(cat ~/erp-platform/api/src/Erp.Platform.HttpApi.Host/appsettings.json | sed 's/^.* //' \ | sed 's/"//g') +# DevExpress lisansını dosyadan oku (GitHub'a commit edilmemiş) +DEVEXPRESS_LICENSE=$(cat ~/erp-platform/api/DevExpress_License.txt 2>/dev/null || echo "") + docker build \ +--build-arg DevExpress_License="${DEVEXPRESS_LICENSE}" \ -t devops.sozsoft.com/sozsoft/erp-platform-api:${VERSION} \ -t devops.sozsoft.com/sozsoft/erp-platform-api:latest \ -f Erp.Platform.HttpApi.Host.Dockerfile . diff --git a/configs/deployment/scripts/build/migrator.sh b/configs/deployment/scripts/build/migrator.sh index cc602c1e..421f89d4 100644 --- a/configs/deployment/scripts/build/migrator.sh +++ b/configs/deployment/scripts/build/migrator.sh @@ -2,8 +2,13 @@ cd ~/erp-platform git checkout main git fetch && git pull -cd api +cd ~/erp-platform/api + +# DevExpress lisansını dosyadan oku (GitHub'a commit edilmemiş) +DEVEXPRESS_LICENSE=$(cat ~/erp-platform/api/DevExpress_License.txt 2>/dev/null || echo "") + docker build \ +--build-arg DevExpress_License="${DEVEXPRESS_LICENSE}" \ -t devops.sozsoft.com/sozsoft/erp-platform-migrator:1.0.0 \ -t devops.sozsoft.com/sozsoft/erp-platform-migrator:latest \ -f Erp.Platform.DbMigrator.Dockerfile .