-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from dragonfruitnetwork/add-iis
Add IIS/Web Deploy support
- Loading branch information
Showing
6 changed files
with
198 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
DragonFruit.Sakura.Host/Properties/PublishProfiles/Web.pubxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process | ||
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121. | ||
--> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<_TargetId>IISWebDeployPackage</_TargetId> | ||
|
||
<DeployIisAppPath>Sakura</DeployIisAppPath> | ||
<WebPublishMethod>Package</WebPublishMethod> | ||
<EnvironmentName>Production</EnvironmentName> | ||
<ProjectGuid>99b15da3-9e63-4970-84b3-dff7948da6a5</ProjectGuid> | ||
|
||
<LastUsedPlatform>Any CPU</LastUsedPlatform> | ||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> | ||
|
||
<ExcludeApp_Data>False</ExcludeApp_Data> | ||
<PublishFramework>net7.0</PublishFramework> | ||
<PackageAsSingleFile>true</PackageAsSingleFile> | ||
<DesktopBuildPackageLocation>bin\publish\Sakura.zip</DesktopBuildPackageLocation> | ||
</PropertyGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<location path="." inheritInChildApplications="false"> | ||
<system.webServer> | ||
<handlers> | ||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /> | ||
</handlers> | ||
<aspNetCore processPath=".\DragonFruit.Sakura.Host.exe" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess"> | ||
</aspNetCore> | ||
|
||
<!-- add brotli/gzip compression support for wasm - see https://learn.microsoft.com/en-us/aspnet/core/blazor/host-and-deploy/webassembly?view=aspnetcore-7.0#brotli-and-gzip-compression --> | ||
<staticContent> | ||
<remove fileExtension=".dll" /> | ||
<remove fileExtension=".json" /> | ||
<remove fileExtension=".woff" /> | ||
<remove fileExtension=".woff2" /> | ||
<remove fileExtension=".wasm" /> | ||
<mimeMap fileExtension=".json" mimeType="application/json" /> | ||
<mimeMap fileExtension=".woff" mimeType="font/woff" /> | ||
<mimeMap fileExtension=".woff2" mimeType="font/woff2" /> | ||
<mimeMap fileExtension=".dat" mimeType="application/octet-stream" /> | ||
<mimeMap fileExtension=".dll" mimeType="application/octet-stream" /> | ||
<mimeMap fileExtension=".wasm" mimeType="application/wasm" /> | ||
<mimeMap fileExtension=".blat" mimeType="application/octet-stream" /> | ||
<mimeMap fileExtension=".js.gz" mimeType="application/javascript" /> | ||
<mimeMap fileExtension=".dat.gz" mimeType="application/octet-stream" /> | ||
<mimeMap fileExtension=".dll.gz" mimeType="application/octet-stream" /> | ||
<mimeMap fileExtension=".json.gz" mimeType="application/json" /> | ||
<mimeMap fileExtension=".wasm.gz" mimeType="application/wasm" /> | ||
<mimeMap fileExtension=".blat.gz" mimeType="application/octet-stream" /> | ||
<mimeMap fileExtension=".html.gz" mimeType="text/html" /> | ||
<mimeMap fileExtension=".css.gz" mimeType="text/css" /> | ||
<mimeMap fileExtension=".ico.gz" mimeType="image/x-icon" /> | ||
<mimeMap fileExtension=".svg.gz" mimeType="image/svg+xml" /> | ||
<mimeMap fileExtension=".js.br" mimeType="application/javascript" /> | ||
<mimeMap fileExtension=".dat.br" mimeType="application/octet-stream" /> | ||
<mimeMap fileExtension=".dll.br" mimeType="application/octet-stream" /> | ||
<mimeMap fileExtension=".json.br" mimeType="application/json" /> | ||
<mimeMap fileExtension=".wasm.br" mimeType="application/wasm" /> | ||
<mimeMap fileExtension=".blat.br" mimeType="application/octet-stream" /> | ||
<mimeMap fileExtension=".html.br" mimeType="text/html" /> | ||
<mimeMap fileExtension=".css.br" mimeType="text/css" /> | ||
<mimeMap fileExtension=".ico.br" mimeType="image/x-icon" /> | ||
<mimeMap fileExtension=".svg.br" mimeType="image/svg+xml" /> | ||
</staticContent> | ||
<httpCompression> | ||
<dynamicTypes> | ||
<remove mimeType="text/*" /> | ||
<remove mimeType="application/javascript" /> | ||
<remove mimeType="image/svg+xml" /> | ||
</dynamicTypes> | ||
<staticTypes> | ||
<remove mimeType="text/*" /> | ||
<remove mimeType="application/javascript" /> | ||
<remove mimeType="image/svg+xml" /> | ||
</staticTypes> | ||
</httpCompression> | ||
<rewrite> | ||
<outboundRules rewriteBeforeCache="true"> | ||
<rule name="Add Vary Accept-Encoding" preCondition="PreCompressedFile" enabled="true"> | ||
<match serverVariable="RESPONSE_Vary" pattern=".*" /> | ||
<action type="Rewrite" value="Accept-Encoding" /> | ||
</rule> | ||
<rule name="Add Encoding Brotli" preCondition="PreCompressedBrotli" enabled="true" stopProcessing="true"> | ||
<match serverVariable="RESPONSE_Content_Encoding" pattern=".*" /> | ||
<action type="Rewrite" value="br" /> | ||
</rule> | ||
<rule name="Add Encoding Gzip" preCondition="PreCompressedGzip" enabled="true" stopProcessing="true"> | ||
<match serverVariable="RESPONSE_Content_Encoding" pattern=".*" /> | ||
<action type="Rewrite" value="gzip" /> | ||
</rule> | ||
<preConditions> | ||
<preCondition name="PreCompressedFile"> | ||
<add input="{HTTP_URL}" pattern="\.(gz|br)$" /> | ||
</preCondition> | ||
<preCondition name="PreCompressedBrotli"> | ||
<add input="{HTTP_URL}" pattern="\.br$" /> | ||
</preCondition> | ||
<preCondition name="PreCompressedGzip"> | ||
<add input="{HTTP_URL}" pattern="\.gz$" /> | ||
</preCondition> | ||
</preConditions> | ||
</outboundRules> | ||
<rules> | ||
<rule name="Rewrite brotli file" stopProcessing="true"> | ||
<match url="(.*)"/> | ||
<conditions> | ||
<add input="{HTTP_ACCEPT_ENCODING}" pattern="br" /> | ||
<add input="{REQUEST_FILENAME}" pattern="\.(js|dat|dll|json|wasm|blat|htm|html|css|ico|svg)$" /> | ||
<add input="{REQUEST_FILENAME}.br" matchType="IsFile" /> | ||
</conditions> | ||
<action type="Rewrite" url="{R:1}.br" /> | ||
</rule> | ||
<rule name="Rewrite gzip file" stopProcessing="true"> | ||
<match url="(.*)"/> | ||
<conditions> | ||
<add input="{HTTP_ACCEPT_ENCODING}" pattern="gzip" /> | ||
<add input="{REQUEST_FILENAME}" pattern="\.(js|dat|dll|json|wasm|blat|htm|html|css|ico|svg)$" /> | ||
<add input="{REQUEST_FILENAME}.gz" matchType="IsFile" /> | ||
</conditions> | ||
<action type="Rewrite" url="{R:1}.gz" /> | ||
</rule> | ||
</rules> | ||
</rewrite> | ||
</system.webServer> | ||
</location> | ||
</configuration> | ||
<!--ProjectGuid: --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters