Skip to content

Commit 265dd3d

Browse files
committed
Alloy and SQL in separate Docker containers
1 parent 4951ce1 commit 265dd3d

14 files changed

+103
-9
lines changed

src/AlloyDemoKit.sln

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio 14
4-
VisualStudioVersion = 14.0.25420.1
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26823.1
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AlloyDemoKit", "AlloyDemoKit\AlloyDemoKit.csproj", "{6FA51284-08EC-4032-AF77-D6F2ECA790D4}"
77
EndProject
88
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WeatherService", "WeatherService\WeatherService.csproj", "{847FDA30-8EC3-48CD-B82B-D7FC4BD54621}"
99
EndProject
10+
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{E48E0FC1-5D23-4320-B1C0-378D5E210281}"
11+
EndProject
1012
Global
1113
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1214
Debug|Any CPU = Debug|Any CPU
@@ -21,8 +23,15 @@ Global
2123
{847FDA30-8EC3-48CD-B82B-D7FC4BD54621}.Debug|Any CPU.Build.0 = Debug|Any CPU
2224
{847FDA30-8EC3-48CD-B82B-D7FC4BD54621}.Release|Any CPU.ActiveCfg = Release|Any CPU
2325
{847FDA30-8EC3-48CD-B82B-D7FC4BD54621}.Release|Any CPU.Build.0 = Release|Any CPU
26+
{E48E0FC1-5D23-4320-B1C0-378D5E210281}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
27+
{E48E0FC1-5D23-4320-B1C0-378D5E210281}.Debug|Any CPU.Build.0 = Debug|Any CPU
28+
{E48E0FC1-5D23-4320-B1C0-378D5E210281}.Release|Any CPU.ActiveCfg = Release|Any CPU
29+
{E48E0FC1-5D23-4320-B1C0-378D5E210281}.Release|Any CPU.Build.0 = Release|Any CPU
2430
EndGlobalSection
2531
GlobalSection(SolutionProperties) = preSolution
2632
HideSolutionNode = FALSE
2733
EndGlobalSection
34+
GlobalSection(ExtensibilityGlobals) = postSolution
35+
SolutionGuid = {18B09D61-FFC0-41C5-A254-DDDD2D9E37FF}
36+
EndGlobalSection
2837
EndGlobal

src/AlloyDemoKit/.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!obj\Docker\publish\*
3+
!obj\Docker\empty\

src/AlloyDemoKit/AlloyDemoKit.csproj

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.7\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.7\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
4+
<Import Project="..\packages\Microsoft.Net.Compilers.2.1.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.2.1.0\build\Microsoft.Net.Compilers.props')" />
35
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
46
<PropertyGroup>
57
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -264,6 +266,9 @@
264266
<Reference Include="Microsoft.AspNet.Identity.Owin, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
265267
<HintPath>..\packages\Microsoft.AspNet.Identity.Owin.2.2.1\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
266268
</Reference>
269+
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
270+
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.7\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
271+
</Reference>
267272
<Reference Include="Microsoft.CSharp" />
268273
<Reference Include="Microsoft.Owin, Version=3.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
269274
<HintPath>..\packages\Microsoft.Owin.3.1.0\lib\net45\Microsoft.Owin.dll</HintPath>
@@ -673,6 +678,10 @@
673678
<Content Include="ClientResources\Styles\Styles.css" />
674679
<Content Include="favicon.ico" />
675680
<Content Include="App_Data\GeoLiteCity.dat" />
681+
<None Include="Dockerfile" />
682+
<None Include=".dockerignore">
683+
<DependentUpon>Dockerfile</DependentUpon>
684+
</None>
676685
<None Include="Hunspellx64.dll">
677686
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
678687
</None>
@@ -1101,6 +1110,8 @@
11011110
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
11021111
</PropertyGroup>
11031112
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
1113+
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.2.1.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.2.1.0\build\Microsoft.Net.Compilers.props'))" />
1114+
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.7\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.7\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
11041115
</Target>
11051116
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
11061117
Other similar extension points exist, see Microsoft.Common.targets.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

src/AlloyDemoKit/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM microsoft/aspnet:4.6.2
2+
ARG source
3+
WORKDIR /inetpub/wwwroot
4+
COPY ${source:-obj/Docker/publish} .

src/AlloyDemoKit/Web.config

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,7 @@
126126
<add extension=".jpeg" policy="DontCache" kernelCachePolicy="CacheUntilChange" duration="0.00:01:00" location="Any" />
127127
</profiles>
128128
</caching>
129-
<httpErrors errorMode="Custom" existingResponse="Replace">
130-
<remove statusCode="404" />
131-
<!-- Note! You should change this to your custom error page. See the
132-
readme on https://github.com/BVNetwork/404handler for more information -->
133-
<error statusCode="404" path="/notfound.aspx" responseMode="ExecuteURL" />
134-
</httpErrors>
129+
135130
<validation validateIntegratedModeConfiguration="false" />
136131
</system.webServer>
137132
<entityFramework>
@@ -555,7 +550,7 @@
555550
</system.serviceModel>
556551
<episerver.packaging protectedVirtualPath="~/EPiServer/" protectedPath="modules/_Protected" publicVirtualPath="~/modules/" publicPath="modules" installationMode="Code" />
557552
<connectionStrings>
558-
<add name="EPiServerDB" connectionString="Data Source=(LocalDb)\MSSqlLocalDB;AttachDbFilename=|DataDirectory|alloydemokit.mdf;Initial Catalog=alloydemokit;Connection Timeout=60;Integrated Security=True;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
553+
<add name="EPiServerDB" connectionString="Data Source=alloydemokit-db;Initial Catalog=alloydemokit;Integrated Security=False;User ID=sa;Password=All0yDemokit!;MultipleActiveResultSets=True" providerName="System.Data.SqlClient" />
559554
</connectionStrings>
560555
<location path="Views/Plugins">
561556
<system.web>
@@ -587,4 +582,10 @@
587582
<add name="EPiServerBlobReaderPlugin" />
588583
</plugins>
589584
</resizer>
585+
<system.codedom>
586+
<compilers>
587+
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701" />
588+
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
589+
</compilers>
590+
</system.codedom>
590591
</configuration>

src/AlloyDemoKit/packages.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@
5858
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net462" />
5959
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net462" />
6060
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net462" />
61+
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.7" targetFramework="net461" />
62+
<package id="Microsoft.Net.Compilers" version="2.1.0" targetFramework="net461" developmentDependency="true" />
6163
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net462" />
6264
<package id="Microsoft.Owin" version="3.1.0" targetFramework="net461" />
6365
<package id="Microsoft.Owin.Host.SystemWeb" version="3.1.0" targetFramework="net461" />

src/WeatherService/WeatherService.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.7\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.7\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
4+
<Import Project="..\packages\Microsoft.Net.Compilers.2.1.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\packages\Microsoft.Net.Compilers.2.1.0\build\Microsoft.Net.Compilers.props')" />
35
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
46
<PropertyGroup>
57
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -36,6 +38,9 @@
3638
<Reference Include="HttpClientHelpers, Version=1.0.1.2, Culture=neutral, processorArchitecture=MSIL">
3739
<HintPath>..\packages\HttpClientHelpers.1.0.1.2\lib\portable-net45+dnxcore50+win+wpa81+wp80\HttpClientHelpers.dll</HintPath>
3840
</Reference>
41+
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
42+
<HintPath>..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.7\lib\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.dll</HintPath>
43+
</Reference>
3944
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
4045
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
4146
</Reference>
@@ -115,6 +120,8 @@
115120
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
116121
</PropertyGroup>
117122
<Error Condition="!Exists('..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Bcl.Build.1.0.21\build\Microsoft.Bcl.Build.targets'))" />
123+
<Error Condition="!Exists('..\packages\Microsoft.Net.Compilers.2.1.0\build\Microsoft.Net.Compilers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Net.Compilers.2.1.0\build\Microsoft.Net.Compilers.props'))" />
124+
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.7\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.7\build\net45\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" />
118125
</Target>
119126
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
120127
Other similar extension points exist, see Microsoft.Common.targets.

src/WeatherService/packages.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
<package id="HttpClientHelpers" version="1.0.1.2" targetFramework="net462" />
44
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net462" />
55
<package id="Microsoft.Bcl.Build" version="1.0.21" targetFramework="net462" />
6+
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.7" targetFramework="net461" />
7+
<package id="Microsoft.Net.Compilers" version="2.1.0" targetFramework="net461" developmentDependency="true" />
68
<package id="Microsoft.Net.Http" version="2.2.29" targetFramework="net462" />
79
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net461" />
810
</packages>

0 commit comments

Comments
 (0)