Files
Umbraco-CMS/tests/Umbraco.Tests.AcceptanceTest/misc/umbraco-linux.docker
Bjarke Berg b1e42e334d Move to Minimal Hosting Model in a backwards compatible way (#14656)
* Use minimal hosting model

* Make CoreRuntime backward compatible to the old hosting model

* Remove unneccessary methods from interface again

* Pushed the timeout for E2E test to 120 minutes instead of 60

* Updated the preview version from 6 to 7

* Explicitly call BootUmbracoAsync

* Add CreateUmbracoBuilder extension method

* Do not add IRuntime as hosted service when using WebApplication/WebApplicationBuilder

* Set StaticServiceProvider.Instance before booting

* Ensure Umbraco is booted and StaticServiceProvider.Instance is set before configuring middleware

* Do not enable static web assets on production environments

* Removed root namespace from viewImports

---------

Co-authored-by: Andreas Zerbst <andr317c@live.dk>
Co-authored-by: Ronald Barendse <ronald@barend.se>
2023-08-21 12:24:17 +02:00

52 lines
1.7 KiB
Docker

############################################
## Build
############################################
FROM mcr.microsoft.com/dotnet/nightly/sdk:8.0.100-preview.7-jammy AS build
COPY nuget.config .
COPY nuget.config .
WORKDIR /nupkg
COPY nupkg .
WORKDIR /build
RUN dotnet new --install /nupkg/Umbraco.Templates.*.nupkg
RUN dotnet new umbraco --name AcceptanceTestProject --no-restore --output .
RUN dotnet restore --configfile /nuget.config
RUN dotnet build --configuration Release --no-restore
RUN dotnet publish --configuration Release --no-build --output /dist
############################################
## Run
############################################
FROM mcr.microsoft.com/dotnet/nightly/aspnet:8.0.0-preview.7-jammy AS run
WORKDIR /app
COPY --from=build dist .
# Enable console logging in Release mode
ENV Serilog__WriteTo__0__Name=Async
ENV Serilog__WriteTo__0__Args__configure__0__Name=Console
# Set unattended install settings
ENV ConnectionStrings__umbracoDbDSN_ProviderName="Microsoft.Data.Sqlite"
ENV ConnectionStrings__umbracoDbDSN="Data Source=|DataDirectory|/Umbraco.sqlite.db;Cache=Shared;Foreign Keys=True;Pooling=True"
ENV Umbraco__CMS__Unattended__InstallUnattended="true"
ENV Umbraco__CMS__Unattended__UnattendedUserName="Playwright Test"
ENV Umbraco__CMS__Unattended__UnattendedUserEmail="playwright@umbraco.com"
ENV Umbraco__CMS__Unattended__UnattendedUserPassword="UmbracoAcceptance123!"
# Custom Umbraco settings
ENV Umbraco__CMS__Global__VersionCheckPeriod="0"
ENV Umbraco__CMS__Global__UseHttps="true"
ENV Umbraco__CMS__HealthChecks__Notification__Enabled="false"
ENV Umbraco__CMS__KeepAlive__DisableKeepAliveTask="true"
# Set application URL
ENV ASPNETCORE_URLS="http://0.0.0.0:5000;https://0.0.0.0:5001"
CMD dotnet AcceptanceTestProject.dll