Created 09. Deploying eShopOnContainers to a "Production" environment (markdown)
parent
586e8f64eb
commit
07dfebf694
@ -0,0 +1,27 @@
|
||||
This instructions section is in early draft state because the current version of eShopOncontainers has been tested most of all on plain Docker engine and just smoke tests on some orchestrators like ACS Kubernetes and Docker Swarm.
|
||||
|
||||
However, since there are people testing it in "production environments" out of the dev machine (VS2017+Docker) but in a prod. environment like Azure, here's some important infor to take into account.
|
||||
|
||||
The "by default configuration" in docker-compose.override.yml file is set with specific config so makes it straightforward to test the solution in a Windows PC with Visual Studio 2017. For instance, it is using the "**10.0.75.1**" IP used by default in all "Docker for Windows" installations, so it can be used by the Identity Container for the login page when being redirected from the client apps without you having to change any specific IP.
|
||||
|
||||
However, when depoying eShopOnContainers to other environments like a real Docker Host, or simply if you want to access the apps from remote applications, there are some settings for the Identity Service that need to be changed by using the config especified at a "PRODUCTION" docker-compose file:
|
||||
docker-compose.**prod**.yml (**for "production environments"**).
|
||||
That file is using the environment variables provided by the "**.env**" file which basically has the local name and the "External" IP or DNS name to be used by the remote client apps.
|
||||
|
||||
**FIRST STEP:**
|
||||
Basically, you'd need to change the IP (or DNS name) at the .env file with the IP or DNS name you have for your Docker host or orchestrator cluster. If it is a local machine using Docker for Windows, then, it'll be your real WiFi or Ethernet card IP:
|
||||
https://github.com/dotnet/eShopOnContainers/blob/master/**.env**
|
||||
# The IP below should be swapped and use your real IP or DNS name, like 192.168.88.248 or your DNS name, etc. if testing from remote browsers or mobile devices.
|
||||
|
||||
ESHOP_EXTERNAL_DNS_NAME_OR_IP=localhost
|
||||
ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP=10.121.122.92
|
||||
|
||||
**SECOND STEP:**
|
||||
For deploying with docker-compose, instead of doing a regular “docker-compose up” do:
|
||||
**docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d**
|
||||
So it uses the docker-compose.**prod**.yml file which uses the EXTERNAL IP or DNS name.
|
||||
https://github.com/dotnet/eShopOnContainers/blob/master/docker-compose.prod.yml
|
||||
And follow the procedure here:
|
||||
https://github.com/dotnet/eShopOnContainers/wiki/03.-Setting-the-eShopOnContainers-solution-up-in-a-Windows-CLI-environment-(dotnet-CLI,-Docker-CLI-and-VS-Code)
|
||||
|
||||
But,
|
Loading…
x
Reference in New Issue
Block a user