* Publish E2E application logs * Stop app after running E2E tests * Update GenerateAppsettingsSchema task * Enable console logging in Release mode * Cleanup variables and enable logging in Linux docker * Remove --yes from npx commands * Set custom Umbraco settings (disable keep-alive, health checks, etc.) * Update Docker image tags/versions * Change PowerShell@2 task to pwsh and write results to artifact staging directory * Ignore Playwright .env file
50 lines
1.7 KiB
Docker
50 lines
1.7 KiB
Docker
############################################
|
|
## Build
|
|
############################################
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:6.0.401 AS build
|
|
|
|
COPY nuget.config .
|
|
|
|
WORKDIR /nupkg
|
|
COPY nupkg .
|
|
|
|
WORKDIR /build
|
|
RUN dotnet new --install /nupkg/Umbraco.Templates.*.nupkg
|
|
RUN dotnet new umbraco --name Playwright --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/aspnet:6.0.9 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 Playwright.dll
|