Ordering.API integrated and working now on the solutions's docker-compose.yml. Also created an independent docker-compose.yml for the Ordering.API microservice to deploy and test in isolation.
This commit is contained in:
parent
e60e65ab0d
commit
9ede5f0522
@ -9,6 +9,7 @@ services:
|
||||
- "80:80"
|
||||
depends_on:
|
||||
- catalog.api
|
||||
|
||||
catalog.api:
|
||||
image: eshop/catalog.api
|
||||
environment:
|
||||
@ -17,5 +18,17 @@ services:
|
||||
- "80"
|
||||
depends_on:
|
||||
- catalogdata
|
||||
|
||||
catalogdata:
|
||||
image: glennc/eshopdata
|
||||
image: glennc/eshopdata
|
||||
|
||||
ordering.api:
|
||||
image: eshop/ordering.api
|
||||
environment:
|
||||
- ConnectionString=TBD
|
||||
expose:
|
||||
- "80"
|
||||
ports:
|
||||
- "81:80"
|
||||
extra_hosts:
|
||||
- "CESARDLBOOKVHD:10.0.75.1"
|
||||
|
@ -1,30 +1,30 @@
|
||||
FROM microsoft/dotnet:1.0.0-preview2-sdk
|
||||
FROM microsoft/aspnetcore
|
||||
# Other .NET images
|
||||
# FROM microsoft/dotnet:1.0.0-preview2-sdk
|
||||
# FROM microsoft/dotnet:1.0.0-core
|
||||
|
||||
#Lighter image if copying the compiled app and entrypoint as ENTRYPOINT dotnet Ordering.API.dll
|
||||
#FROM microsoft/dotnet:1.0.0-core
|
||||
|
||||
# Set the Working Directory
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
# Configure the listening port to 80
|
||||
ENV ASPNETCORE_URLS http://*:80
|
||||
# ENV ASPNETCORE_URLS http://*:80
|
||||
|
||||
# Open port exposed by Docker
|
||||
EXPOSE 80/tcp
|
||||
ADD . /app
|
||||
# COPY . /app
|
||||
|
||||
# Copy the app
|
||||
COPY . /app
|
||||
# Entry point through the copied assembly
|
||||
ENTRYPOINT dotnet Ordering.API.dll
|
||||
|
||||
#################
|
||||
# Entry point running the SDK --> Requires heavy Docker .NET image, not for production
|
||||
# Restore NuGet packages
|
||||
#RUN ["dotnet", "restore"]
|
||||
|
||||
# Build the .NET Core app
|
||||
#RUN ["dotnet", "build"]
|
||||
|
||||
# Entrypoint
|
||||
#ENTRYPOINT ["dotnet", "run"]
|
||||
#################
|
||||
|
||||
# Entry point through the copied assembly
|
||||
ENTRYPOINT dotnet Ordering.API.dll
|
||||
|
||||
|
||||
|
||||
|
@ -46,7 +46,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API
|
||||
//var connString = @"Server=CESARDLBOOKVHD;Database=Microsoft.eShopOnContainers.Services.OrderingDb;Trusted_Connection=True;";
|
||||
|
||||
//(SQL Server Authentication)
|
||||
var connString = @"Server=CESARDLBOOKVHD;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;";
|
||||
var connString = @"Server=10.0.75.1;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;";
|
||||
|
||||
//(TBD) connString = config.GetConnectionString("SqlStandardAuthentication.OrderingDb");
|
||||
|
||||
|
@ -1,12 +1,11 @@
|
||||
version: '2'
|
||||
|
||||
services:
|
||||
microsoft.eshoponcontainers.services.ordering.api:
|
||||
image: username/microsoft.eshoponcontainers.services.ordering.api
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ordering.api:
|
||||
image: eshop/ordering.api
|
||||
environment:
|
||||
- ConnectionString=TBD
|
||||
ports:
|
||||
- "80:80"
|
||||
- "81:80"
|
||||
extra_hosts:
|
||||
- "CESARDLBOOKVHD:10.0.75.1"
|
@ -39,7 +39,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork
|
||||
//(Integrated Security) var connString = @"Server=CESARDLBOOKVHD;Database=Microsoft.eShopOnContainers.Services.OrderingDb;Trusted_Connection=True;";
|
||||
|
||||
//(SQL Server Authentication)
|
||||
var connString = @"Server=CESARDLBOOKVHD;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;";
|
||||
var connString = @"Server=10.0.75.1;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;";
|
||||
|
||||
//SQL LOCALDB
|
||||
builder.UseSqlServer(connString);
|
||||
|
@ -31,7 +31,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.SqlData.UnitOfWork
|
||||
//var connString = @"Server=CESARDLBOOKVHD;Database=Microsoft.eShopOnContainers.Services.OrderingDb;Trusted_Connection=True;";
|
||||
|
||||
//(SQL Server Authentication)
|
||||
var connString = @"Server=CESARDLBOOKVHD;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;";
|
||||
var connString = @"Server=10.0.75.1;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;";
|
||||
|
||||
//SQL LOCALDB
|
||||
optionsBuilder.UseSqlServer(connString);
|
||||
|
Loading…
x
Reference in New Issue
Block a user