diff --git a/docker-compose.local.build.yml b/cli-linux/docker-compose.local.build.yml similarity index 100% rename from docker-compose.local.build.yml rename to cli-linux/docker-compose.local.build.yml diff --git a/docker-compose.dcproj b/docker-compose.dcproj index 91d4a272e..59afd14a8 100644 --- a/docker-compose.dcproj +++ b/docker-compose.dcproj @@ -11,6 +11,7 @@ docker-compose.yml + docker-compose.yml diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml new file mode 100644 index 000000000..89917a056 --- /dev/null +++ b/docker-compose.prod.yml @@ -0,0 +1,76 @@ +version: '2' + +# The Production docker-compose file has to have the external/real IPs or DNS names for the services +# This configuration has to be used when testing the Web apps and the Xamarin apps from remote machines/devices using the same WiFi, for instance. +# ASPNETCORE_ENVIRONMENT=Development just to get errors while testing. Could be set to "Production" +# +# You need to start it with the following CLI command: +# docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d + +services: + + basket.api: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:5103 + - ConnectionString=basket.data + - identityUrl=http://identity.api:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. + ports: + - "5103:5103" + + catalog.api: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:5101 + - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=sa;Password=Pass@word + - ExternalCatalogBaseUrl=http://192.168.88.248:5101 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. + ports: + - "5101:5101" + + identity.api: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:5105 + - SpaClient=http://192.168.88.248:5104 + - ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word + - MvcClient=http://192.168.88.248:5100 #Local: You need to open your host's firewall at range 5100-5105. + ports: + - "5105:5105" + + ordering.api: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:5102 + - ConnectionString=Server=sql.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word + - identityUrl=http://identity.api:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. + ports: + - "5102:5102" + + webspa: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:5104 + - CatalogUrl=http://192.168.88.248:5101 + - OrderingUrl=http://192.168.88.248:5102 + - IdentityUrl=http://192.168.88.248:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. + - BasketUrl=http://192.168.88.248:5103 + ports: + - "5104:5104" + + webmvc: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ASPNETCORE_URLS=http://0.0.0.0:5100 + - CatalogUrl=http://catalog.api:5101 + - OrderingUrl=http://ordering.api:5102 + - IdentityUrl=http://192.168.88.248:5105 #Local: You need to open your host's firewall at range 5100-5105. at range 5100-5105. + - BasketUrl=http://basket.api:5103 + ports: + - "5100:5100" + + sql.data: + environment: + - SA_PASSWORD=Pass@word + - ACCEPT_EULA=Y + ports: + - "5433:1433" \ No newline at end of file diff --git a/src/Console/eShopConsole/Program.cs b/src/Console/eShopConsole/Program.cs deleted file mode 100644 index f647bc2d5..000000000 --- a/src/Console/eShopConsole/Program.cs +++ /dev/null @@ -1,71 +0,0 @@ -using System; -using System.Linq; -using Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork; -using Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel; -using Microsoft.eShopOnContainers.Services.Ordering.Domain.Contracts; -using Microsoft.eShopOnContainers.Services.Ordering.SqlData.Repositories; -using Microsoft.EntityFrameworkCore; - -namespace eShopConsole -{ - public class Program - { - public static void Main(string[] args) - { - //// All contexts that share the same service provider will share the same database - - ////Using InMemory DB - ////var options = DbContextUtil.CreateNewContextOptionsForInMemoryDB(); - - ////Using Sql Server - //var options = DbContextUtil.CreateNewContextOptionsForSqlDb(); - - //// Run the test against one instance of the context - //using (var context = new OrderingDbContext(options)) - //{ - // IOrderRepository orderRepository = new OrderRepository(context); - - // //Create generic Address ValueObject - // Address sampleAddress = new Address("15703 NE 61st Ct.", - // "Redmond", - // "Washington", - // "WA", - // "United States", - // "US", - // "98052", - // 47.661492, - // -122.131309 - // ); - // //Create sample Orders - // Order order1 = new Order(Guid.NewGuid(), sampleAddress, sampleAddress); - - // //Add a few OrderItems - // order1.AddNewOrderItem(Guid.NewGuid(), 2, 25, 30); - // order1.AddNewOrderItem(Guid.NewGuid(), 1, 58, 0); - // order1.AddNewOrderItem(Guid.NewGuid(), 1, 60, 0); - // order1.AddNewOrderItem(Guid.NewGuid(), 3, 12, 0); - // order1.AddNewOrderItem(Guid.NewGuid(), 5, 3, 0); - - // orderRepository.Add(order1); - // orderRepository.UnitOfWork.CommitAsync(); - - // //With no Async Repository - // //context.Orders.Add(order1); - // //context.SaveChanges(); - - //} - - ////// Use a separate instance of the context to verify correct data was saved to database - //using (var context = new OrderingDbContext(options)) - //{ - // var orders = context.Orders - // .Include(o => o.ShippingAddress) - // .Include(o => o.BillingAddress) - // .ToList(); - - // string cityName = orders.First().ShippingAddress.City; - // Console.WriteLine("City name retreived from SQL Server: "+cityName); - //} - } - } -} diff --git a/src/Console/eShopConsole/Properties/AssemblyInfo.cs b/src/Console/eShopConsole/Properties/AssemblyInfo.cs deleted file mode 100644 index 4c33ef24d..000000000 --- a/src/Console/eShopConsole/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("eShopConsole")] -[assembly: AssemblyTrademark("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("c10c7b69-ce4f-4167-928e-33b7fa1dffc7")] diff --git a/src/Console/eShopConsole/Properties/launchSettings.json b/src/Console/eShopConsole/Properties/launchSettings.json deleted file mode 100644 index bddd8d3e8..000000000 --- a/src/Console/eShopConsole/Properties/launchSettings.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "profiles": { - } -} \ No newline at end of file diff --git a/src/Console/eShopConsole/eShopConsole.xproj b/src/Console/eShopConsole/eShopConsole.xproj deleted file mode 100644 index 16b79ebb7..000000000 --- a/src/Console/eShopConsole/eShopConsole.xproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - 14.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - c10c7b69-ce4f-4167-928e-33b7fa1dffc7 - eShopConsole - .\obj - .\bin\ - v4.6 - - - 2.0 - - - \ No newline at end of file diff --git a/src/Console/eShopConsole/project.json b/src/Console/eShopConsole/project.json deleted file mode 100644 index f953c60fe..000000000 --- a/src/Console/eShopConsole/project.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "version": "1.0.0-*", - "buildOptions": { - "emitEntryPoint": true, - "debugType": "portable" - }, - "dependencies": { - "Microsoft.EntityFrameworkCore": "1.0.0", - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0" - }, - "Ordering.Domain": "1.0.0-*", - }, - "frameworks": { - "netcoreapp1.0": { - "imports": "dnxcore50" - } - }, - "publishOptions": { - "include": [ - "docker-compose.yml", - "docker-compose.debug.yml", - "Dockerfile.debug", - "Dockerfile", - ".dockerignore" - ] - } -} \ No newline at end of file