File tree 3 files changed +36
-0
lines changed
3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change @@ -15,6 +15,16 @@ https://docs.docker.com
15
15
```
16
16
17
17
## 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
+
18
28
```
19
29
pcat docker-compose.yml
20
30
You can’t perform that action at this time.
0 commit comments