diff --git a/build-images.ps1 b/build-images.ps1 index c34290d3a..8e1fbe1af 100644 --- a/build-images.ps1 +++ b/build-images.ps1 @@ -15,6 +15,7 @@ Write-Host "webPathToPub is $webPathToPub" -ForegroundColor Yellow Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue dotnet restore $webPathToJson +dotnet build $webPathToJson dotnet publish $webPathToJson -o $webPathToPub #*** Catalog service image *** @@ -25,6 +26,7 @@ Write-Host "catalogPathToPub is $catalogPathToPub" -ForegroundColor Yellow Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue dotnet restore $catalogPathToJson +dotnet build $catalogPathToJson dotnet publish $catalogPathToJson -o $catalogPathToPub #*** Ordering service image *** @@ -35,6 +37,7 @@ Write-Host "orderingPathToPub is $orderingPathToPub" -ForegroundColor Yellow Write-Host "Restore Dependencies just in case as it is needed to run dotnet publish" -ForegroundColor Blue dotnet restore $orderingPathToJson +dotnet build $orderingPathToJson dotnet publish $orderingPathToJson -o $orderingPathToPub diff --git a/docker-compose.yml b/docker-compose.yml index a0dfb7088..db20052cd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,16 +2,17 @@ version: '2' services: webmvc: - image: eshop/web + image: eshop/web:latest environment: - CatalogUrl=http://catalog.api + - OrderingUrl=http://ordering.api ports: - "80:80" depends_on: - catalog.api catalog.api: - image: eshop/catalog.api + image: eshop/catalog.api:latest environment: - ConnectionString=Server=catalogdata;Port=5432;Database=postgres;username=postgres expose: @@ -23,11 +24,16 @@ services: image: glennc/eshopdata ordering.api: - image: eshop/ordering.api + image: eshop/ordering.api:latest environment: - ConnectionString=Server=ordering.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word + - ASPNETCORE_ENVIRONMENT=Development ports: - "81:80" +# (Go to Production): For secured/final deployment, remove Ports mapping and +# leave just the internal expose section +# expose: +# - "80" extra_hosts: - "CESARDLBOOKVHD:10.0.75.1" depends_on: diff --git a/src/Services/Ordering/Ordering.API/Migrations/20161011040943_Migration2.Designer.cs b/src/Services/Ordering/Ordering.API/Migrations/20161011040943_Migration2.Designer.cs new file mode 100644 index 000000000..9728a1902 --- /dev/null +++ b/src/Services/Ordering/Ordering.API/Migrations/20161011040943_Migration2.Designer.cs @@ -0,0 +1,123 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork; + +namespace Ordering.API.Migrations +{ + [DbContext(typeof(OrderingDbContext))] + [Migration("20161011040943_Migration2")] + partial class Migration2 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { + modelBuilder + .HasAnnotation("ProductVersion", "1.0.0-rtm-21431") + .HasAnnotation("Relational:Sequence:shared.OrderSequences", "'OrderSequences', 'shared', '1001', '1', '', '', 'Int32', 'False'") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("City"); + + b.Property("Country"); + + b.Property("CountryCode"); + + b.Property("Latitude"); + + b.Property("Longitude"); + + b.Property("State"); + + b.Property("StateCode"); + + b.Property("Street"); + + b.Property("ZipCode"); + + b.HasKey("Id"); + + b.ToTable("Address"); + }); + + modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BillingAddressId"); + + b.Property("BuyerId"); + + b.Property("OrderDate"); + + b.Property("SequenceNumber") + .ValueGeneratedOnAdd() + .HasDefaultValueSql("NEXT VALUE FOR shared.OrderSequences"); + + b.Property("ShippingAddressId"); + + b.Property("Status"); + + b.HasKey("Id"); + + b.HasIndex("BillingAddressId"); + + b.HasIndex("ShippingAddressId"); + + b.ToTable("Orders"); + }); + + modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Discount"); + + b.Property("FulfillmentRemaining"); + + b.Property("OrderId"); + + b.Property("ProductId"); + + b.Property("ProductName"); + + b.Property("Quantity"); + + b.Property("UnitPrice"); + + b.HasKey("Id"); + + b.HasIndex("OrderId"); + + b.ToTable("OrderItem"); + }); + + modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => + { + b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "BillingAddress") + .WithMany() + .HasForeignKey("BillingAddressId"); + + b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "ShippingAddress") + .WithMany() + .HasForeignKey("ShippingAddressId"); + }); + + modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => + { + b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order") + .WithMany("OrderItems") + .HasForeignKey("OrderId") + .OnDelete(DeleteBehavior.Cascade); + }); + } + } +} diff --git a/src/Services/Ordering/Ordering.API/Migrations/20161011040943_Migration2.cs b/src/Services/Ordering/Ordering.API/Migrations/20161011040943_Migration2.cs new file mode 100644 index 000000000..caf45e9c0 --- /dev/null +++ b/src/Services/Ordering/Ordering.API/Migrations/20161011040943_Migration2.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Ordering.API.Migrations +{ + public partial class Migration2 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AddColumn( + name: "ProductName", + table: "OrderItem", + nullable: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropColumn( + name: "ProductName", + table: "OrderItem"); + } + } +} diff --git a/src/Services/Ordering/Ordering.API/Migrations/20161011041130_Migration3.Designer.cs b/src/Services/Ordering/Ordering.API/Migrations/20161011041130_Migration3.Designer.cs new file mode 100644 index 000000000..f0d76e51f --- /dev/null +++ b/src/Services/Ordering/Ordering.API/Migrations/20161011041130_Migration3.Designer.cs @@ -0,0 +1,123 @@ +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork; + +namespace Ordering.API.Migrations +{ + [DbContext(typeof(OrderingDbContext))] + [Migration("20161011041130_Migration3")] + partial class Migration3 + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { + modelBuilder + .HasAnnotation("ProductVersion", "1.0.0-rtm-21431") + .HasAnnotation("Relational:Sequence:shared.OrderSequences", "'OrderSequences', 'shared', '1001', '1', '', '', 'Int32', 'False'") + .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn); + + modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("City"); + + b.Property("Country"); + + b.Property("CountryCode"); + + b.Property("Latitude"); + + b.Property("Longitude"); + + b.Property("State"); + + b.Property("StateCode"); + + b.Property("Street"); + + b.Property("ZipCode"); + + b.HasKey("Id"); + + b.ToTable("Address"); + }); + + modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("BillingAddressId"); + + b.Property("BuyerId"); + + b.Property("OrderDate"); + + b.Property("SequenceNumber") + .ValueGeneratedOnAdd() + .HasDefaultValueSql("NEXT VALUE FOR shared.OrderSequences"); + + b.Property("ShippingAddressId"); + + b.Property("Status"); + + b.HasKey("Id"); + + b.HasIndex("BillingAddressId"); + + b.HasIndex("ShippingAddressId"); + + b.ToTable("Orders"); + }); + + modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd(); + + b.Property("Discount"); + + b.Property("FulfillmentRemaining"); + + b.Property("OrderId"); + + b.Property("ProductId"); + + b.Property("ProductName"); + + b.Property("Quantity"); + + b.Property("UnitPrice"); + + b.HasKey("Id"); + + b.HasIndex("OrderId"); + + b.ToTable("OrderItem"); + }); + + modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order", b => + { + b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "BillingAddress") + .WithMany() + .HasForeignKey("BillingAddressId"); + + b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Address", "ShippingAddress") + .WithMany() + .HasForeignKey("ShippingAddressId"); + }); + + modelBuilder.Entity("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.OrderItem", b => + { + b.HasOne("Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel.Order") + .WithMany("OrderItems") + .HasForeignKey("OrderId") + .OnDelete(DeleteBehavior.Cascade); + }); + } + } +} diff --git a/src/Services/Ordering/Ordering.API/Migrations/20161011041130_Migration3.cs b/src/Services/Ordering/Ordering.API/Migrations/20161011041130_Migration3.cs new file mode 100644 index 000000000..3b3ae2b73 --- /dev/null +++ b/src/Services/Ordering/Ordering.API/Migrations/20161011041130_Migration3.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace Ordering.API.Migrations +{ + public partial class Migration3 : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + + } + } +} diff --git a/src/Services/Ordering/Ordering.API/Migrations/OrderingDbContextModelSnapshot.cs b/src/Services/Ordering/Ordering.API/Migrations/OrderingDbContextModelSnapshot.cs index 0a404dfe0..e7b7b4aaf 100644 --- a/src/Services/Ordering/Ordering.API/Migrations/OrderingDbContextModelSnapshot.cs +++ b/src/Services/Ordering/Ordering.API/Migrations/OrderingDbContextModelSnapshot.cs @@ -86,6 +86,8 @@ namespace Ordering.API.Migrations b.Property("ProductId"); + b.Property("ProductName"); + b.Property("Quantity"); b.Property("UnitPrice"); diff --git a/src/Services/Ordering/Ordering.API/Startup.cs b/src/Services/Ordering/Ordering.API/Startup.cs index 7289683a7..605bcdd59 100644 --- a/src/Services/Ordering/Ordering.API/Startup.cs +++ b/src/Services/Ordering/Ordering.API/Startup.cs @@ -50,6 +50,9 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API var connString = Configuration["ConnectionString"]; + //(CDLTLL) To use only for EF Migrations + //connString = @"Server=10.0.75.1;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;"; + services.AddDbContext(options => options.UseSqlServer(connString) .UseSqlServer(connString, b => b.MigrationsAssembly("Ordering.API")) //(CDLTLL) MigrationsAssembly will be Ordering.SqlData, but when supported diff --git a/src/Services/Ordering/Ordering.API/docker-compose.yml b/src/Services/Ordering/Ordering.API/docker-compose.yml index 8b77ad088..cb76c339d 100644 --- a/src/Services/Ordering/Ordering.API/docker-compose.yml +++ b/src/Services/Ordering/Ordering.API/docker-compose.yml @@ -10,6 +10,10 @@ services: - ConnectionString=Server=ordering.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word ports: - "81:80" +# (Go to Production): For secured/final deployment, remove Ports mapping and +# leave just the internal expose section +# expose: +# - "80" extra_hosts: - "CESARDLBOOKVHD:10.0.75.1" depends_on: diff --git a/src/Services/Ordering/Ordering.API/settings.json b/src/Services/Ordering/Ordering.API/settings.json new file mode 100644 index 000000000..da778d1c4 --- /dev/null +++ b/src/Services/Ordering/Ordering.API/settings.json @@ -0,0 +1,3 @@ +{ + "ConnectionString": "Server=127.0.0.1;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;" +} diff --git a/src/Services/Ordering/Ordering.Domain/AggregatesModel/Order/OrderItem.cs b/src/Services/Ordering/Ordering.Domain/AggregatesModel/Order/OrderItem.cs index aec28b4c2..e993f7117 100644 --- a/src/Services/Ordering/Ordering.Domain/AggregatesModel/Order/OrderItem.cs +++ b/src/Services/Ordering/Ordering.Domain/AggregatesModel/Order/OrderItem.cs @@ -17,6 +17,8 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.Domain.AggregatesModel public decimal UnitPrice { get; set; } + public string ProductName { get; set; } + public int Quantity { get; set; } public decimal Discount { get; set; } diff --git a/src/Services/Ordering/Ordering.SqlData/UnitOfWork/OrderingDbContext.cs b/src/Services/Ordering/Ordering.SqlData/UnitOfWork/OrderingDbContext.cs index 0b8fdd260..e35c3e540 100644 --- a/src/Services/Ordering/Ordering.SqlData/UnitOfWork/OrderingDbContext.cs +++ b/src/Services/Ordering/Ordering.SqlData/UnitOfWork/OrderingDbContext.cs @@ -16,7 +16,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork public DbSet Orders { get; set; } - //(CDLTLL) Probably delete, not using it for now + //(CDLTLL) /* protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { @@ -39,7 +39,6 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork optionsBuilder.UseSqlServer(connString); } - } */ diff --git a/src/Web/Microsoft.eShopOnContainers.WebMVC/Properties/launchSettings.json b/src/Web/Microsoft.eShopOnContainers.WebMVC/Properties/launchSettings.json deleted file mode 100644 index e411a4572..000000000 --- a/src/Web/Microsoft.eShopOnContainers.WebMVC/Properties/launchSettings.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "iisSettings": { - "windowsAuthentication": false, - "anonymousAuthentication": true, - "iisExpress": { - "applicationUrl": "http://localhost:2113/", - "sslPort": 0 - } - }, - "profiles": { - "IIS Express": { - "commandName": "IISExpress", - "launchBrowser": true, - "environmentVariables": { - "ASPNETCORE_ENVIRONMENT": "Development" - } - } - } -} \ No newline at end of file diff --git a/src/Web/WebMVC/AppSettings.cs b/src/Web/WebMVC/AppSettings.cs index f76d22dba..572a6e5b0 100644 --- a/src/Web/WebMVC/AppSettings.cs +++ b/src/Web/WebMVC/AppSettings.cs @@ -9,6 +9,7 @@ namespace Microsoft.eShopOnContainers.WebMVC { public Connectionstrings ConnectionStrings { get; set; } public string CatalogUrl { get; set; } + public string OrderingUrl { get; set; } public Logging Logging { get; set; } } diff --git a/src/Web/WebMVC/Controllers/HomeController.cs b/src/Web/WebMVC/Controllers/HomeController.cs index 9aa982a23..e92eb1f37 100644 --- a/src/Web/WebMVC/Controllers/HomeController.cs +++ b/src/Web/WebMVC/Controllers/HomeController.cs @@ -41,6 +41,16 @@ namespace Microsoft.eShopOnContainers.WebMVC.Controllers return View(); } + public async Task Orders() + { + ViewData["Message"] = "Orders page."; + + var ordersUrl = _settings.OrderingUrl + "/api/ordering/orders"; + var dataString = await _http.GetStringAsync(ordersUrl); + var items = JsonConvert.DeserializeObject>(dataString); + return View(items); + } + public IActionResult Error() { return View(); diff --git a/src/Web/WebMVC/Dockerfile b/src/Web/WebMVC/Dockerfile index db3d9c491..b5328fd54 100644 --- a/src/Web/WebMVC/Dockerfile +++ b/src/Web/WebMVC/Dockerfile @@ -4,5 +4,4 @@ ARG source=. WORKDIR /app ENV ASPNETCORE_URLS http://*:80 EXPOSE 80 -COPY $source . - +COPY $source . \ No newline at end of file diff --git a/src/Web/WebMVC/Models/Address.cs b/src/Web/WebMVC/Models/Address.cs new file mode 100644 index 000000000..268279aa0 --- /dev/null +++ b/src/Web/WebMVC/Models/Address.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Microsoft.eShopOnContainers.WebMVC.Models +{ + public class Address + { + public Guid ID { get; set; } + public string Street { get; set; } + public string City { get; set; } + public string State { get; set; } + public string StateCode { get; set; } + public string Country { get; set; } + public string CountryCode { get; set; } + public string ZipCode { get; set; } + public double Latitude { get; set; } + public double Longitude { get; set; } + } +} diff --git a/src/Web/WebMVC/Models/Order.cs b/src/Web/WebMVC/Models/Order.cs new file mode 100644 index 000000000..9d0e6d1cc --- /dev/null +++ b/src/Web/WebMVC/Models/Order.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Microsoft.eShopOnContainers.WebMVC.Models +{ + public class Order + { + Guid Id; + public List OrderItems { get; set; } + public string OrderNumber + { + get + { + return string.Format("{0}/{1}-{2}", OrderDate.Year, OrderDate.Month, SequenceNumber); + } + } + public int SequenceNumber { get; set; } + public virtual Guid BuyerId { get; set; } + public virtual Address ShippingAddress { get; set; } + public virtual Address BillingAddress { get; set; } + public virtual DateTime OrderDate { get; set; } + + //(CDLTLL) public virtual OrderStatus Status { get; set; } + + + } +} diff --git a/src/Web/WebMVC/Models/OrderItem.cs b/src/Web/WebMVC/Models/OrderItem.cs new file mode 100644 index 000000000..ee0d6ff53 --- /dev/null +++ b/src/Web/WebMVC/Models/OrderItem.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace Microsoft.eShopOnContainers.WebMVC.Models +{ + public class OrderItem + { + Guid Id; + public Guid ProductId { get; set; } + public Guid OrderId { get; set; } + public string ProductName { get; set; } + public decimal UnitPrice { get; set; } + public int Quantity { get; set; } + public decimal Discount { get; set; } + public override string ToString() + { + return String.Format("Product Id: {0}, Quantity: {1}", this.Id, this.Quantity); + } + } + +} diff --git a/src/Web/WebMVC/Views/Home/Orders.cshtml b/src/Web/WebMVC/Views/Home/Orders.cshtml new file mode 100644 index 000000000..905cf78e7 --- /dev/null +++ b/src/Web/WebMVC/Views/Home/Orders.cshtml @@ -0,0 +1,50 @@ +@{ + ViewData["Title"] = "Orders"; + @model IEnumerable +} +

@ViewData["Title"].

+

@ViewData["Message"]

+ + +@foreach (var order in Model) +{ +
+
+

+ Order Number: @order.OrderNumber +

+
+
+ BuyerId: @order.BuyerId
+ OrderDate: @order.OrderDate
+ SequenceNumber: @order.SequenceNumber
+
+
+
+ Street: @order.ShippingAddress.Street
+ City: @order.ShippingAddress.City
+ State: @order.ShippingAddress.State
+ StateCode: @order.ShippingAddress.StateCode
+ Country: @order.ShippingAddress.Country
+ CountryCode: @order.ShippingAddress.CountryCode
+ ZipCode: @order.ShippingAddress.ZipCode
+ Latitude: @order.ShippingAddress.Latitude
+ Longitude: @order.ShippingAddress.Longitude
+
+
+
+ @foreach (var orderItem in order.OrderItems) + { +
+ ProductId: @orderItem.ProductId
+ ProductName: @orderItem.ProductName
+ Price: @orderItem.UnitPrice
+ Quantity: @orderItem.Quantity
+ Discount: @orderItem.Discount
+
+ } +
+
+} + + diff --git a/src/Web/WebMVC/Views/Shared/_Layout.cshtml b/src/Web/WebMVC/Views/Shared/_Layout.cshtml index b60bc79b7..45247c70f 100644 --- a/src/Web/WebMVC/Views/Shared/_Layout.cshtml +++ b/src/Web/WebMVC/Views/Shared/_Layout.cshtml @@ -33,6 +33,7 @@
  • Home
  • About
  • Contact
  • +
  • Orders
  • @await Html.PartialAsync("_LoginPartial") diff --git a/src/Web/WebMVC/appsettings.json b/src/Web/WebMVC/appsettings.json index d0108f51e..80195bbb1 100644 --- a/src/Web/WebMVC/appsettings.json +++ b/src/Web/WebMVC/appsettings.json @@ -3,6 +3,7 @@ "DefaultConnection": "Server=(localdb)\\mssqllocaldb;Database=aspnet-Microsoft.eShopOnContainers.WebMVC-946ae052-8305-4a99-965b-ec8636ddbae3;Trusted_Connection=True;MultipleActiveResultSets=true" }, "CatalogUrl": "http://localhost:2418/", + "OrderingUrl": "http://localhost:2446/", "Logging": { "IncludeScopes": false, "LogLevel": { diff --git a/src/Web/WebMVC/docker-compose.yml b/src/Web/WebMVC/docker-compose.yml index 8cb3c34ea..75ee47622 100644 --- a/src/Web/WebMVC/docker-compose.yml +++ b/src/Web/WebMVC/docker-compose.yml @@ -8,6 +8,7 @@ services: dockerfile: Dockerfile environment: - CatalogUrl=http://catalog.api + - OrderingUrl=http://ordering.api ports: - "80:80" depends_on: @@ -31,6 +32,10 @@ services: - ConnectionString=Server=ordering.data;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word ports: - "81:80" +# (Go to Production): For secured/final deployment, remove Ports mapping and +# leave just the internal expose section +# expose: +# - "80" extra_hosts: - "CESARDLBOOKVHD:10.0.75.1" depends_on: