Skip to content

Commit 4ac9672

Browse files
Merge pull request #61 from umbraco/feature/testsite
Add example test site
2 parents 09c4964 + cc6f017 commit 4ac9672

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+7375
-0
lines changed

Umbraco.StorageProviders.sln

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Umbraco Marketplace", "Umbr
3636
umbraco-marketplace-Umbraco.StorageProviders.json = umbraco-marketplace-Umbraco.StorageProviders.json
3737
EndProjectSection
3838
EndProject
39+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{209D581B-FE93-4050-BED7-D439D00CEC5A}"
40+
ProjectSection(SolutionItems) = preProject
41+
examples\Directory.Build.props = examples\Directory.Build.props
42+
examples\Directory.Packages.props = examples\Directory.Packages.props
43+
EndProjectSection
44+
EndProject
45+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Umbraco.StorageProviders.TestSite", "examples\Umbraco.StorageProviders.TestSite\Umbraco.StorageProviders.TestSite.csproj", "{9B1140ED-9F17-44B0-80CF-FA50F949B65B}"
46+
EndProject
3947
Global
4048
GlobalSection(SolutionConfigurationPlatforms) = preSolution
4149
Debug|Any CPU = Debug|Any CPU
@@ -82,12 +90,25 @@ Global
8290
{D88EAD61-5596-415D-B8B2-CBE83B35DC68}.Release|x64.Build.0 = Release|Any CPU
8391
{D88EAD61-5596-415D-B8B2-CBE83B35DC68}.Release|x86.ActiveCfg = Release|Any CPU
8492
{D88EAD61-5596-415D-B8B2-CBE83B35DC68}.Release|x86.Build.0 = Release|Any CPU
93+
{9B1140ED-9F17-44B0-80CF-FA50F949B65B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
94+
{9B1140ED-9F17-44B0-80CF-FA50F949B65B}.Debug|Any CPU.Build.0 = Debug|Any CPU
95+
{9B1140ED-9F17-44B0-80CF-FA50F949B65B}.Debug|x64.ActiveCfg = Debug|Any CPU
96+
{9B1140ED-9F17-44B0-80CF-FA50F949B65B}.Debug|x64.Build.0 = Debug|Any CPU
97+
{9B1140ED-9F17-44B0-80CF-FA50F949B65B}.Debug|x86.ActiveCfg = Debug|Any CPU
98+
{9B1140ED-9F17-44B0-80CF-FA50F949B65B}.Debug|x86.Build.0 = Debug|Any CPU
99+
{9B1140ED-9F17-44B0-80CF-FA50F949B65B}.Release|Any CPU.ActiveCfg = Release|Any CPU
100+
{9B1140ED-9F17-44B0-80CF-FA50F949B65B}.Release|Any CPU.Build.0 = Release|Any CPU
101+
{9B1140ED-9F17-44B0-80CF-FA50F949B65B}.Release|x64.ActiveCfg = Release|Any CPU
102+
{9B1140ED-9F17-44B0-80CF-FA50F949B65B}.Release|x64.Build.0 = Release|Any CPU
103+
{9B1140ED-9F17-44B0-80CF-FA50F949B65B}.Release|x86.ActiveCfg = Release|Any CPU
104+
{9B1140ED-9F17-44B0-80CF-FA50F949B65B}.Release|x86.Build.0 = Release|Any CPU
85105
EndGlobalSection
86106
GlobalSection(SolutionProperties) = preSolution
87107
HideSolutionNode = FALSE
88108
EndGlobalSection
89109
GlobalSection(NestedProjects) = preSolution
90110
{52E66DE4-F70B-4E6C-B8BE-91D8873CBE95} = {F00AB141-9521-4D68-967D-4326FEB32E1B}
111+
{9B1140ED-9F17-44B0-80CF-FA50F949B65B} = {209D581B-FE93-4050-BED7-D439D00CEC5A}
91112
EndGlobalSection
92113
GlobalSection(ExtensibilityGlobals) = postSolution
93114
SolutionGuid = {1476D78A-AFF2-44AD-8425-C77786B527FD}

examples/Directory.Build.props

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project>
2+
<PropertyGroup>
3+
<IsPackable>false</IsPackable>
4+
<EnablePackageValidation>false</EnablePackageValidation>
5+
</PropertyGroup>
6+
</Project>

examples/Directory.Packages.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
<PropertyGroup>
3+
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
4+
</PropertyGroup>
5+
</Project>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
##
2+
## Umbraco CMS
3+
##
4+
5+
# JSON schema files for appsettings.json
6+
appsettings-schema.json
7+
appsettings-schema.*.json
8+
9+
# Packages created from the backoffice (package.xml/package.zip)
10+
/umbraco/Data/CreatedPackages/
11+
12+
# Temp folder containing Examine indexes, NuCache, MediaCache, etc.
13+
/umbraco/Data/TEMP/
14+
15+
# SQLite database files
16+
/umbraco/Data/*.sqlite.db
17+
/umbraco/Data/*.sqlite.db-shm
18+
/umbraco/Data/*.sqlite.db-wal
19+
20+
# Log files
21+
/umbraco/Logs/
22+
23+
# Media files
24+
/wwwroot/media/
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Microsoft.Extensions.Options;
2+
using Umbraco.Cms.Core.Composing;
3+
using Umbraco.Cms.Core.Events;
4+
using Umbraco.Cms.Core.Notifications;
5+
using Umbraco.StorageProviders.AzureBlob.IO;
6+
7+
namespace Umbraco.StorageProviders.TestSite;
8+
9+
internal sealed class AzureBlobFileSystemComposer : IComposer
10+
{
11+
public void Compose(IUmbracoBuilder builder)
12+
=> builder
13+
.AddAzureBlobMediaFileSystem()
14+
.AddAzureBlobImageSharpCache()
15+
.AddNotificationHandler<UnattendedInstallNotification, AzureBlobMediaFileSystemCreateIfNotExistsHandler>();
16+
17+
private sealed class AzureBlobMediaFileSystemCreateIfNotExistsHandler : INotificationHandler<UnattendedInstallNotification>
18+
{
19+
private readonly AzureBlobFileSystemOptions _options;
20+
21+
public AzureBlobMediaFileSystemCreateIfNotExistsHandler(IOptionsMonitor<AzureBlobFileSystemOptions> options)
22+
=> _options = options.Get(AzureBlobFileSystemOptions.MediaFileSystemName);
23+
24+
public void Handle(UnattendedInstallNotification notification)
25+
=> AzureBlobFileSystem.CreateIfNotExists(_options);
26+
}
27+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
2+
3+
builder.CreateUmbracoBuilder()
4+
.AddBackOffice()
5+
.AddWebsite()
6+
.AddDeliveryApi()
7+
.AddComposers()
8+
.Build();
9+
10+
WebApplication app = builder.Build();
11+
12+
await app.BootUmbracoAsync();
13+
14+
app.UseUmbraco()
15+
.WithMiddleware(u =>
16+
{
17+
u.UseBackOffice();
18+
u.UseWebsite();
19+
})
20+
.WithEndpoints(u =>
21+
{
22+
u.UseInstallerEndpoints();
23+
u.UseBackOfficeEndpoints();
24+
u.UseWebsiteEndpoints();
25+
});
26+
27+
await app.RunAsync();
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"$schema": "https://json.schemastore.org/launchsettings.json",
3+
"iisSettings": {
4+
"windowsAuthentication": false,
5+
"anonymousAuthentication": true,
6+
"iisExpress": {
7+
"applicationUrl": "http://localhost:39676",
8+
"sslPort": 44333
9+
}
10+
},
11+
"profiles": {
12+
"IIS Express": {
13+
"commandName": "IISExpress",
14+
"launchBrowser": true,
15+
"environmentVariables": {
16+
"ASPNETCORE_ENVIRONMENT": "Development"
17+
}
18+
},
19+
"Umbraco.Web.UI": {
20+
"commandName": "Project",
21+
"dotnetRunMessages": true,
22+
"launchBrowser": true,
23+
"applicationUrl": "https://localhost:44333;http://localhost:39676",
24+
"environmentVariables": {
25+
"ASPNETCORE_ENVIRONMENT": "Development"
26+
}
27+
}
28+
}
29+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"dependencies": {
3+
"storage1": {
4+
"type": "storage",
5+
"connectionId": "Media"
6+
}
7+
}
8+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"dependencies": {
3+
"storage1": {
4+
"secretStore": null,
5+
"type": "storage.emulator",
6+
"connectionId": "Media"
7+
}
8+
}
9+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<Project Sdk="Microsoft.NET.Sdk.Web">
2+
<PropertyGroup>
3+
<TargetFramework>net8.0</TargetFramework>
4+
<ImplicitUsings>enable</ImplicitUsings>
5+
<Nullable>enable</Nullable>
6+
</PropertyGroup>
7+
8+
<ItemGroup>
9+
<PackageReference Include="Umbraco.Cms" Version="13.0.0-rc1" />
10+
<PackageReference Include="Umbraco.TheStarterKit" Version="12.0.0" />
11+
</ItemGroup>
12+
13+
<Import Project="..\..\src\Umbraco.StorageProviders\buildTransitive\Umbraco.StorageProviders.props" />
14+
<Import Project="..\..\src\Umbraco.StorageProviders.AzureBlob\buildTransitive\Umbraco.StorageProviders.AzureBlob.props" />
15+
<ItemGroup>
16+
<ProjectReference Include="..\..\src\Umbraco.StorageProviders\Umbraco.StorageProviders.csproj" />
17+
<ProjectReference Include="..\..\src\Umbraco.StorageProviders.AzureBlob\Umbraco.StorageProviders.AzureBlob.csproj" />
18+
<ProjectReference Include="..\..\src\Umbraco.StorageProviders.AzureBlob.ImageSharp\Umbraco.StorageProviders.AzureBlob.ImageSharp.csproj" />
19+
</ItemGroup>
20+
21+
<ItemGroup>
22+
<!-- Opt-in to app-local ICU to ensure consistent globalization APIs across different platforms -->
23+
<PackageReference Include="Microsoft.ICU.ICU4C.Runtime" Version="72.1.0.1" />
24+
<RuntimeHostConfigurationOption Include="System.Globalization.AppLocalIcu" Value="72.1.0.1" Condition="$(RuntimeIdentifier.StartsWith('linux')) or $(RuntimeIdentifier.StartsWith('win')) or ('$(RuntimeIdentifier)' == '' and !$([MSBuild]::IsOSPlatform('osx')))" />
25+
</ItemGroup>
26+
27+
<PropertyGroup>
28+
<!-- Razor files are needed for the backoffice to work correctly -->
29+
<CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory>
30+
</PropertyGroup>
31+
32+
<PropertyGroup>
33+
<!-- Remove RazorCompileOnBuild and RazorCompileOnPublish when not using ModelsMode InMemoryAuto -->
34+
<RazorCompileOnBuild>false</RazorCompileOnBuild>
35+
<RazorCompileOnPublish>false</RazorCompileOnPublish>
36+
</PropertyGroup>
37+
</Project>

0 commit comments

Comments
 (0)