Skip to content

Commit 86e39af

Browse files
committedJul 18, 2021
compose sample 2 added
1 parent 86fce5a commit 86e39af

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed
 

‎compose-sample-2/docker-compose.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: '3'
2+
3+
services:
4+
proxy:
5+
image: nginx:1.13 # this will use the latest version of 1.13.x
6+
ports:
7+
- '80:80' # expose 80 on host and sent to 80 in container
8+
volumes:
9+
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
10+
web:
11+
image: httpd # this will use httpd:latest

‎compose-sample-2/nginx.conf

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
server {
2+
3+
listen 80;
4+
5+
location / {
6+
7+
proxy_pass http://web;
8+
proxy_redirect off;
9+
proxy_set_header Host $host;
10+
proxy_set_header X-Real-IP $remote_addr;
11+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
12+
proxy_set_header X-Forwarded-Host $server_name;
13+
14+
}
15+
}

‎docker-process-approach/docker-4.md

+10
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,16 @@ https://docs.docker.com
1515
```
1616

1717
## Trying Out Basic Compose Commands
18+
* CLI tools comes with Docker for linux but seperate to download linux.
19+
* Not a production-grade tool but ideal for local development and test.
20+
* <b>Two common commands are: </b>
21+
* docker-compose up : to setup volumes/networks and start all containers.
22+
* docker-compose down : to stop all containers and remove cont/vol/net.
23+
* If all your projects had a Dockerfile and docker-compose.yml file then new devloper onboarding would be:
24+
* git clone github.com/some/software
25+
* docker-compose up
26+
27+
1828
```
1929
pcat docker-compose.yml
2030

0 commit comments

Comments
 (0)
Please sign in to comment.