You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
scripts to build individual services, readme files for all services and clients, compose in all projects, fix build problems (Dependent seeds), solve some kwnon build problems in solution (identity on localhost, ...)
Sample reference containerized application, cross-platform and microservices architecture.
3
-
Powered by .NET Core, Docker and Docker Swarm mode
3
+
Powered by Microsoft
4
+
5
+
<imgsrc="img/eshop_cover.png">
6
+
7
+
#Overview
8
+
In this repo you will fin samples that will help you to get introduced into <b>.net core</b>, microservices environment and <b>docker</b>.
9
+
10
+
11
+
#Tools
12
+
#### Windows
13
+
<ahref='https://github.com/docker/toolbox/releases/download/v1.12.3/DockerToolbox-1.12.3.exe'>Docker tools for windows</a>
14
+
15
+
####Mac
16
+
<ahref='https://github.com/docker/toolbox/releases/download/v1.12.3/DockerToolbox-1.12.3.pkg'>Docker tools for Mac</a>
17
+
18
+
##Set up Cpu and Memory
19
+
In this demo we will run 3 instances of SQL Server, 6 asp.net core applications and 1 redis server it's important to set up properly the Cpu and Ram assigned to docker. This can be set, once installed docker in your device through the whale icon, right click, settings and in the Advanced option you will need to adjust the default to the new values shown in the image:
20
+
21
+
<imgsrc="img/docker_settings.png">
22
+
23
+
#Demo
24
+
The demo scenario is based on a ecommerce shop, each service is a .net core web application (basket, catalog, ordering, identity) and this services are consumed by differents web and mobile applications.
25
+
26
+
MVC Application: Its an Mvc 6 development where you can find good samples about how to work with microservices in a MVC asp.net core application.
27
+
28
+
SPA Application: Developed with Angular2, Typescript and Mvc 6, is another different aproach in web on how to work in a Microservices oriented solution.
29
+
30
+
Xamarin Application (Ios, Windows, Android): Its a client application that run in mobile devices (ios, android, windows) and you can find another example on how to build a microservices oriented application.
31
+
32
+
#Deploy goblal
33
+
In the global directory you will find the scripts needed to run and deploy the demo into your local docker infraestructure. The steps:
34
+
35
+
36
+
- <ahref='build-images.ps1'>build-images.ps1</a> <b>Build .net applications and docker images</b>: This power shell script that you will find in the <u>root directory of the solution</u> is the responsible of building .net applications and package in a pub folder and use docker commands to build the images needed to run the previously packaged .net applications.
37
+
38
+
- <b>Compose containers in your docker local VM</b>: Finally you have to open your favourite command tool <u>pointing to the root directory of the solution</u> where docker-compose.yml file is located and run the command `docker-compose up`
39
+
40
+
#Run
41
+
Once the deploy process of docker-compose finishes you have to be able to access the services in this urls from your machine:
42
+
- Web: http://localhost:5100
43
+
- Web Spa: http://localhost:5104
44
+
- Catalog service: http://localhost:5101
45
+
- Orders service: http://localhost:5102
46
+
- Basket service: http://localhost:5103
47
+
- Identity service: http://localhost:5105
48
+
- Orders data (SQL Server): Server=tcp:localhost,5432;Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=sa;Password=Pass@word;
49
+
- Catalog data (SQL Server): Server=tcp:localhost,5434;Database=CatalogDB;User Id=sa;Password=Pass@word
50
+
- Identity data (SQL Server): Server=localhost,5433;Database=aspnet-Microsoft.eShopOnContainers;User Id=sa;Password=Pass@word
51
+
- Basket data (Redis): listening in localhost:6379
52
+
53
+
#Deploy individiual services into docker
54
+
Under each project root you will find a readme.md file as this that describes how to run and deploy the service individually into a docker container.
0 commit comments