diff --git a/samples/MicroserviceDemo/.dockerignore b/samples/MicroserviceDemo/.dockerignore deleted file mode 100644 index e694ae215f..0000000000 --- a/samples/MicroserviceDemo/.dockerignore +++ /dev/null @@ -1,12 +0,0 @@ -.dockerignore -.env -.git -.gitignore -.vs -.vscode -docker-compose.yml -docker-compose.*.yml -*/bin -*/obj -!obj/Docker/publish/* -!obj/Docker/empty/ diff --git a/samples/MicroserviceDemo/MicroserviceDemo.PermissionService/MicroserviceDemo.PermissionService.csproj b/samples/MicroserviceDemo/MicroserviceDemo.PermissionService/MicroserviceDemo.PermissionService.csproj new file mode 100644 index 0000000000..965e3b7401 --- /dev/null +++ b/samples/MicroserviceDemo/MicroserviceDemo.PermissionService/MicroserviceDemo.PermissionService.csproj @@ -0,0 +1,15 @@ + + + + netcoreapp2.0 + + + + + + + + + + + diff --git a/samples/MicroserviceDemo/MicroserviceDemo.PermissionService/Program.cs b/samples/MicroserviceDemo/MicroserviceDemo.PermissionService/Program.cs new file mode 100644 index 0000000000..98691c4b28 --- /dev/null +++ b/samples/MicroserviceDemo/MicroserviceDemo.PermissionService/Program.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; + +namespace MicroserviceDemo.PermissionService +{ + public class Program + { + public static void Main(string[] args) + { + BuildWebHost(args).Run(); + } + + public static IWebHost BuildWebHost(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseStartup() + .Build(); + } +} diff --git a/samples/MicroserviceDemo/MicroserviceDemo.PermissionService/Properties/launchSettings.json b/samples/MicroserviceDemo/MicroserviceDemo.PermissionService/Properties/launchSettings.json new file mode 100644 index 0000000000..df9a71e23e --- /dev/null +++ b/samples/MicroserviceDemo/MicroserviceDemo.PermissionService/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:63908/", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "MicroserviceDemo.PermissionService": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "http://localhost:63909/" + } + } +} diff --git a/samples/MicroserviceDemo/MicroserviceDemo.PermissionService/Startup.cs b/samples/MicroserviceDemo/MicroserviceDemo.PermissionService/Startup.cs new file mode 100644 index 0000000000..90fa5c7c6a --- /dev/null +++ b/samples/MicroserviceDemo/MicroserviceDemo.PermissionService/Startup.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; + +namespace MicroserviceDemo.PermissionService +{ + public class Startup + { + // This method gets called by the runtime. Use this method to add services to the container. + // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 + public void ConfigureServices(IServiceCollection services) + { + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IHostingEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.Run(async (context) => + { + await context.Response.WriteAsync("Hello World!"); + }); + } + } +} diff --git a/samples/MicroserviceDemo/MicroserviceDemo.TenancyService/MicroserviceDemo.TenancyService.csproj b/samples/MicroserviceDemo/MicroserviceDemo.TenancyService/MicroserviceDemo.TenancyService.csproj new file mode 100644 index 0000000000..965e3b7401 --- /dev/null +++ b/samples/MicroserviceDemo/MicroserviceDemo.TenancyService/MicroserviceDemo.TenancyService.csproj @@ -0,0 +1,15 @@ + + + + netcoreapp2.0 + + + + + + + + + + + diff --git a/samples/MicroserviceDemo/MicroserviceDemo.TenancyService/Program.cs b/samples/MicroserviceDemo/MicroserviceDemo.TenancyService/Program.cs new file mode 100644 index 0000000000..83d54c5534 --- /dev/null +++ b/samples/MicroserviceDemo/MicroserviceDemo.TenancyService/Program.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Logging; + +namespace MicroserviceDemo.TenancyService +{ + public class Program + { + public static void Main(string[] args) + { + BuildWebHost(args).Run(); + } + + public static IWebHost BuildWebHost(string[] args) => + WebHost.CreateDefaultBuilder(args) + .UseStartup() + .Build(); + } +} diff --git a/samples/MicroserviceDemo/MicroserviceDemo.TenancyService/Properties/launchSettings.json b/samples/MicroserviceDemo/MicroserviceDemo.TenancyService/Properties/launchSettings.json new file mode 100644 index 0000000000..1003164737 --- /dev/null +++ b/samples/MicroserviceDemo/MicroserviceDemo.TenancyService/Properties/launchSettings.json @@ -0,0 +1,27 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:63877/", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "MicroserviceDemo.TenancyService": { + "commandName": "Project", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "applicationUrl": "http://localhost:63878/" + } + } +} diff --git a/samples/MicroserviceDemo/MicroserviceDemo.TenancyService/Startup.cs b/samples/MicroserviceDemo/MicroserviceDemo.TenancyService/Startup.cs new file mode 100644 index 0000000000..3333b1d3dd --- /dev/null +++ b/samples/MicroserviceDemo/MicroserviceDemo.TenancyService/Startup.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.DependencyInjection; + +namespace MicroserviceDemo.TenancyService +{ + public class Startup + { + // This method gets called by the runtime. Use this method to add services to the container. + // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940 + public void ConfigureServices(IServiceCollection services) + { + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IHostingEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.Run(async (context) => + { + await context.Response.WriteAsync("Hello World!"); + }); + } + } +} diff --git a/samples/MicroserviceDemo/MicroserviceDemo.sln b/samples/MicroserviceDemo/MicroserviceDemo.sln index a322b1b5d2..ad42689777 100644 --- a/samples/MicroserviceDemo/MicroserviceDemo.sln +++ b/samples/MicroserviceDemo/MicroserviceDemo.sln @@ -1,11 +1,13 @@  Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 -VisualStudioVersion = 15.0.27130.2026 +VisualStudioVersion = 15.0.27130.2036 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MicroserviceDemo.Web", "MicroserviceDemo.Web\MicroserviceDemo.Web.csproj", "{0F012333-D449-43BF-87F9-FD6B78CD5022}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MicroserviceDemo.Web", "MicroserviceDemo.Web\MicroserviceDemo.Web.csproj", "{0F012333-D449-43BF-87F9-FD6B78CD5022}" EndProject -Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{E2C7F429-72E6-4AEE-9DFC-F16BD72A27BD}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MicroserviceDemo.TenancyService", "MicroserviceDemo.TenancyService\MicroserviceDemo.TenancyService.csproj", "{D2DB47C8-824E-43E3-968D-F3C5869F77B7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MicroserviceDemo.PermissionService", "MicroserviceDemo.PermissionService\MicroserviceDemo.PermissionService.csproj", "{60A2DE7B-2079-4643-9CF5-6A8E5C9CF644}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -17,10 +19,14 @@ Global {0F012333-D449-43BF-87F9-FD6B78CD5022}.Debug|Any CPU.Build.0 = Debug|Any CPU {0F012333-D449-43BF-87F9-FD6B78CD5022}.Release|Any CPU.ActiveCfg = Release|Any CPU {0F012333-D449-43BF-87F9-FD6B78CD5022}.Release|Any CPU.Build.0 = Release|Any CPU - {E2C7F429-72E6-4AEE-9DFC-F16BD72A27BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E2C7F429-72E6-4AEE-9DFC-F16BD72A27BD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E2C7F429-72E6-4AEE-9DFC-F16BD72A27BD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E2C7F429-72E6-4AEE-9DFC-F16BD72A27BD}.Release|Any CPU.Build.0 = Release|Any CPU + {D2DB47C8-824E-43E3-968D-F3C5869F77B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D2DB47C8-824E-43E3-968D-F3C5869F77B7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D2DB47C8-824E-43E3-968D-F3C5869F77B7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D2DB47C8-824E-43E3-968D-F3C5869F77B7}.Release|Any CPU.Build.0 = Release|Any CPU + {60A2DE7B-2079-4643-9CF5-6A8E5C9CF644}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {60A2DE7B-2079-4643-9CF5-6A8E5C9CF644}.Debug|Any CPU.Build.0 = Debug|Any CPU + {60A2DE7B-2079-4643-9CF5-6A8E5C9CF644}.Release|Any CPU.ActiveCfg = Release|Any CPU + {60A2DE7B-2079-4643-9CF5-6A8E5C9CF644}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/samples/MicroserviceDemo/docker-compose.ci.build.yml b/samples/MicroserviceDemo/docker-compose.ci.build.yml deleted file mode 100644 index 246b12ae80..0000000000 --- a/samples/MicroserviceDemo/docker-compose.ci.build.yml +++ /dev/null @@ -1,9 +0,0 @@ -version: '3' - -services: - ci-build: - image: microsoft/aspnetcore-build:1.0-2.0 - volumes: - - .:/src - working_dir: /src - command: /bin/bash -c "dotnet restore ./MicroserviceDemo.sln && dotnet publish ./MicroserviceDemo.sln -c Release -o ./obj/Docker/publish" diff --git a/samples/MicroserviceDemo/docker-compose.dcproj b/samples/MicroserviceDemo/docker-compose.dcproj deleted file mode 100644 index 47b451db91..0000000000 --- a/samples/MicroserviceDemo/docker-compose.dcproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - 2.0 - Linux - e2c7f429-72e6-4aee-9dfc-f16bd72a27bd - True - http://localhost:{ServicePort} - microservicedemo.web - - - - docker-compose.yml - - - - - - \ No newline at end of file diff --git a/samples/MicroserviceDemo/docker-compose.override.yml b/samples/MicroserviceDemo/docker-compose.override.yml deleted file mode 100644 index 433007248e..0000000000 --- a/samples/MicroserviceDemo/docker-compose.override.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: '3' - -services: - microservicedemo.web: - environment: - - ASPNETCORE_ENVIRONMENT=Development - ports: - - "80" diff --git a/samples/MicroserviceDemo/docker-compose.yml b/samples/MicroserviceDemo/docker-compose.yml deleted file mode 100644 index 78fa564dad..0000000000 --- a/samples/MicroserviceDemo/docker-compose.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: '3' - -services: - microservicedemo.web: - image: microservicedemo.web - build: - context: . - dockerfile: MicroserviceDemo.Web/Dockerfile