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
Copy file name to clipboardExpand all lines: README.md
+11-10Lines changed: 11 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ The app was also partially tested on "Docker for Mac" using a development MacOS
32
32
33
33
34
34
## Development Environment Setup
35
-
### Requirements for Dec. 2016 version of eShopOnContainers
35
+
### Requirements for January 2016 version of eShopOnContainers
36
36
37
37
WINDOWS DEV MACHINE
38
38
- Visual Studio 2015 with latest Update
@@ -49,8 +49,8 @@ MAC DEV MACHINE
49
49
### Installing and configuring Docker in your development machine
50
50
51
51
#### Set needed assigned Memory and CPU to Docker
52
-
In this application (January 2017 version) we run 1 instance of SQL Server running as a container plus 6 ASP.NET Core apps/services and 1 Redis server all of them running as Docker containers. So, especially because of SQL Server requirements on memory, it is important to set Docker up properly with enough memory RAM and CPU assigned to it or you will get difficult errors when starting the containers with "docker-compose up".
53
-
Once Docker for Windows/Mac is installed in your machine, enter into its Settings and the Advanced menu option so you are able to adjust it to the new values (Memory: Around 6GB and CPU:4) as shown in the image. Usually you might need a 16GB or 12GB memory machine for this configuration. If you have a less powerful machine, you can try with a lower configuration and/or by not starting certain containers like the basket and Redis. But if you don't start all the containers, the application will not fully function properly, of course.
52
+
In this application (January 2017 version) we run 1 instance of SQL Server running as a container with multiple databases (one DB per microservice), plus 6 ASP.NET Core apps/services and 1 Redis server, all of them running as Docker containers. So, especially because of SQL Server requirements on memory, it is important to set Docker up properly with enough memory RAM and CPU assigned to it or you will get difficult errors when starting the containers with "docker-compose up".
53
+
Once Docker for Windows/Mac is installed in your machine, enter into its Settings and the Advanced menu option so you are able to adjust it to the minimum amount of memory and CPU (Memory: Around 4096MB and CPU:3) as shown in the image. Usually you might need a 16GB memory machine for this configuration if you also want to run the Android emulator for the Xamarin app at the same time. If you have a less powerful machine, you can try with a lower configuration and/or by not starting certain containers like the basket and Redis. But if you don't start all the containers, the application will not fully function properly, of course.
54
54
55
55
<imgsrc="img/docker_settings.png">
56
56
@@ -88,22 +88,23 @@ You can deploy Docker containers to a regularDocker host either by using the `do
88
88
The next time you run docker-compose up, since it'll have those base images already pulled/downloaded, it will just start the containers, like in the following screenshot:
89
89
<imgsrc="img/docker-compose-up-2.png">
90
90
91
-
- <b>Check out the containers running in your Docker host</b>:Once docker-compose up finishes after a few minutes, you will have that PowerShell showing the execution's output in a "wait state", so in order to ask to Docker about "how it went" and see what containers are running, you need to open a second PowerShell window and type "docker ps" so you'll see all the running containers, as shown in the following screenshot.
91
+
- <b>Check out the containers running in your Docker host</b>:Once docker-compose up finishes after a few minutes, you will have that PowerShell showing the execution's output in a "wait state", so in order to ask to Docker about "how it went" and see what containers are running, you need to open a second PowerShell window and type "docker ps" so you'll see all the running containers, as shown in the following screenshot.
You can see the 6 custom containers running the microservices plus the 2 web applications. In adition you have the containers with the SQL databases and the Redis cache for the basket microservice data.
94
94
95
-
### Test the application and the microservices
95
+
96
96
#### IMPORTANT: Modify your local "hosts" file by setting an IP related to the identity.service network name
97
97
- Due to the fact that when trying to authenticate against the STS (Security Token Service) container the browser is redirected to it from outside the docker host (your browser in your PC), it needs to have an IP reachable from outside the Docker Host. Therefore you need to add an entry like `10.0.75.1 identity.service` or `127.0.0.1 identity.service` to your <b>hosts</b> file in your local dev machine.
98
98
- If you don't want to hassle with it, just run the PowerShell script named `add-host-entry.ps1` from the solution root folder.
99
99
- If the STS were running in an external IP in a server, in the Internet or in any cloud like Azure, since that IP is reachable from anywhere, you wouldn't need to configure your hosts file. However, that IP would need to be updated into your docker-compose.yml file, in the identity.service URLs.
100
-
#### Test the applications and microservices
100
+
101
+
### Test the applications and microservices
101
102
Once the deploy process of docker-compose finishes you should be able to access the services in the following URLs or connection string, from your dev machine:
102
103
- Web MVC: http://localhost:5100
103
-
- Web Spa: http://localhost:5104
104
-
- Catalog microservice: http://localhost:5101
105
-
- Ordering microservice: http://localhost:5102
106
-
- Basket microservice: http://localhost:5103
104
+
- Web Spa: http://localhost:5104 (Important, check how to set up the SPA app and requirements before building the Docker images. Instructions at https://github.com/dotnet/eShopOnContainers/tree/master/src/Web/WebSPA/eShopOnContainers.WebSPA or the README.MD from eShopOnContainers/src/Web/WebSPA/eShopOnContainers.WebSPA)
0 commit comments