Edition 0 Updated to asp. Net core 0



Yüklə 11,82 Mb.
Pdf görüntüsü
səhifə110/288
tarix12.07.2023
ölçüsü11,82 Mb.
#136458
1   ...   106   107   108   109   110   111   112   113   ...   288
NET-Microservices-Architecture-for-Containerized-NET-Applications

-
catalog-api 
-
ordering-api 
-
identity-api 
-
basket-api 
-
marketing-api 
sqldata:
image:
mcr.microsoft.com/mssql/server:2019-latest
nosqldata:
image:
mongo
basketdata:
image:
redis
rabbitmq:
image:
rabbitmq:3-management
The values in the base docker-compose.yml file should not change because of different target 
deployment environments. 
If you focus on the webmvc service definition, for instance, you can see how that information is much 
the same no matter what environment you might be targeting. You have the following information: 

The service name: webmvc. 

The container’s custom image: eshop/web
mvc. 

The command to build the custom Docker image, indicating which Dockerfile to use. 

Dependencies on other services, so this container does not start until the other dependency 
containers have started. 
You can have additional configuration, but the important point is that in the base docker-
compose.yml file, you just want to set the information that is common across environments. Then in 
the docker-compose.override.yml or similar files for production or staging, you should place 
configuration that is specific for each environment. 
Usually, the docker-compose.override.yml is used for your development environment, as in the 
following example from eShopOnContainers: 
#docker-compose.override.yml (Extended config for DEVELOPMENT env.)
version:
'3.4'
services:
# Simplified number of services here:
basket-api:
environment:
-
ASPNETCORE_ENVIRONMENT=Development 
-
ASPNETCORE_URLS=http:
//0.0.0.0:80
-
ConnectionString=${ESHOP_AZURE_REDIS_BASKET_DB:
-basketdata}


124 
CHAPTER 5 | Designing and Developing Multi-Container and Microservice-Based .NET Applications 

Yüklə 11,82 Mb.

Dostları ilə paylaş:
1   ...   106   107   108   109   110   111   112   113   ...   288




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©azkurs.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin