updated documentation
This commit is contained in:
		
							parent
							
								
									79b6019152
								
							
						
					
					
						commit
						293d4b60ee
					
				
							
								
								
									
										24
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								README.md
									
									
									
									
									
								
							@ -1,13 +1,19 @@
 | 
				
			|||||||
# Automated Nginx reverse Proxy for Docker Webservices
 | 
					# Automated Nginx reverse Proxy for Docker Webservices
 | 
				
			||||||
 | 
					This image attaches to the docker event queue and creates/removes proxy settings in the contained nginx.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Requirements
 | 
					## Starting the container
 | 
				
			||||||
 | 
					The container is started as:
 | 
				
			||||||
1. installed nginx
 | 
					`docker run --name auto_proxy -d -v /var/run/docker.sock:/var/run/docker.sock -p 80:80 docker_nginx_auto_proxy`
 | 
				
			||||||
2. adapted nginx configuration to include the directory of the generated config files
 | 
					The socket must be handed in so the container can get the events.
 | 
				
			||||||
3. docker daemon must be configured to listen to TCP port
 | 
					 | 
				
			||||||
4. Executing user must be able to send HUG signals to ngix master process
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
## How it works
 | 
					## How it works
 | 
				
			||||||
1. Creates a directory in */tmp* for the generated config files
 | 
					Containers that should be proxied neet meta information in the environment variable *PROXY_DATA* available.
 | 
				
			||||||
2. Attaches to the stream of events from the Docker daemon
 | 
					This variable must be of the following format:
 | 
				
			||||||
3. On every event, it scans all container for avaiable environment variable *PROXY_DATA*
 | 
					`PROXY_DATA=server_name:test.com,port:80`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The following options are possible:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* **server_name**(required) the name of the virtual host
 | 
				
			||||||
 | 
					* **port**(optional, defaults to 80) the port on the target container
 | 
				
			||||||
 | 
					* **ip**(optional, defaults to listen on all IPs) the IP on which the proxy should listen. 
 | 
				
			||||||
 | 
					* **location**(optional) if the proxied web application is not running on the /-path
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user