Update nginx.md
Split commands out from their lead-ins. Signed-off-by: Carson Anderson <ca@carson-anderson.com>master
							parent
							
								
									7a584f21b8
								
							
						
					
					
						commit
						de3263c9d6
					
				| 
						 | 
					@ -57,13 +57,19 @@ Read again [the requirements](recipes.md#requirements).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Ready?
 | 
					Ready?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Run the following:
 | 
					--
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Create the required directories
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
mkdir -p auth
 | 
					mkdir -p auth
 | 
				
			||||||
mkdir -p data
 | 
					mkdir -p data
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Create the main nginx configuration you will use.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# This is the main nginx configuration you will use
 | 
					 | 
				
			||||||
cat <<EOF > auth/nginx.conf
 | 
					cat <<EOF > auth/nginx.conf
 | 
				
			||||||
upstream docker-registry {
 | 
					upstream docker-registry {
 | 
				
			||||||
  server registry:5000;
 | 
					  server registry:5000;
 | 
				
			||||||
| 
						 | 
					@ -123,16 +129,24 @@ server {
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
EOF
 | 
					EOF
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Now, create a password file for "testuser" and "testpassword"
 | 
					Now, create a password file for "testuser" and "testpassword"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
docker run --entrypoint htpasswd httpd:2.4 -bn testuser testpassword > auth/nginx.htpasswd
 | 
					docker run --entrypoint htpasswd httpd:2.4 -bn testuser testpassword > auth/nginx.htpasswd
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Copy over your certificate files
 | 
					Copy over your certificate files
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
cp domain.crt auth
 | 
					cp domain.crt auth
 | 
				
			||||||
cp domain.key auth
 | 
					cp domain.key auth
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Now create your compose file
 | 
					Now create your compose file
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
cat <<EOF > docker-compose.yml
 | 
					cat <<EOF > docker-compose.yml
 | 
				
			||||||
nginx:
 | 
					nginx:
 | 
				
			||||||
  image: "nginx:1.9"
 | 
					  image: "nginx:1.9"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue