Skip to content

Commit f30dcc6

Browse files
authored
Merge pull request aspnetzero#215 from aspnetzero/pr/3547
updated docker documents
2 parents 26170ae + d3f73c6 commit f30dcc6

File tree

2 files changed

+21
-10
lines changed

2 files changed

+21
-10
lines changed

docs/en/Deployment-Angular-Docker.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22

33
ASP.NET Zero solution has a **build folder** which contains a PowerShell script to **build & publish** your solution to the **output** folder.
44

5-
It also contains **Docker** files to run your application inside Docker containers. You can customize the default run configuration according to your requirements.
5+
In order to build Docker images for your project, run ```build-with-ng.ps1```. This script will generate 3 images, one is for the **Mvc** web project, one is for the **Public** web project and the other one is for **Angular** project. After creating the images , you can go to ```build/outputs/Host``` or ```build/outputs/Public``` folders and run related images by running the command below;
66

7-
In your `aspnet-core\docker\ng\` folder, you will see;
7+
```
8+
docker compose -f docker-compose.yml -f docker-compose.override.yml up
9+
```
810

9-
* `up.ps1` which starts the Docker container with the configuration defined in `docker-compose.yml`
10-
* `down.ps1` which shuts down the Docker container with the configuration defined in `docker-compose.yml`
11+
In order to run Angular image, go to ```build/outputs/ng``` folder and run command below;
12+
13+
```
14+
docker compose -f docker-compose.yml up
15+
```
16+
17+
By default, **Mvc** and **Public** images will try to connect to a database on server 192.168.1.37,1433. Change this IP address to IP address of the database you want to connect before building images.
18+
19+
All of these images will use the same ports when you run your apps in Visual Studio, so you can also change those ports for production.
1120

12-
![docker-folder-angular](images/docker-folder-angular.jpg)

docs/en/Deployment-Mvc-Core-Docker.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22

33
ASP.NET Zero solution has a **build folder** which contains a PowerShell script to **build & publish** your solution to the **output** folder.
44

5-
It also contains **Docker** files to run your application inside Docker containers. You can customize the default run configuration according to your requirements.
5+
In order to build Docker images for your project, run ```build-mvc.ps1```. This script will generate 2 images, one is for the MVC web project and other one is for the Public web project. After creating the images , you can go to ```build/outputs/Mvc``` or ```build/outputs/Public``` folders and run related images by running the command below;
66

7-
In your `aspnet-core\docker\mvc\` folder, you will see;
7+
```
8+
docker compose -f docker-compose.yml -f docker-compose.override.yml up
9+
```
10+
11+
By default, these images will try to connect to a database on server 192.168.1.37,1433. Change this IP address to IP address of the database you want to connect before building images.
12+
13+
These images will use the same ports when you run your apps in Visual Studio, so you can also change those ports for production.
814

9-
* `up.ps1` which starts the Docker container with the configuration defined in `docker-compose.yml`
10-
* `down.ps1` which shuts down the Docker container with the configuration defined in `docker-compose.yml`
1115

12-
![docker-folder-angular](images/docker-folder-core-mvc.jpg)

0 commit comments

Comments
 (0)