initialize repository
This commit is contained in:
		
							
								
								
									
										22
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| FROM python:2.7 | ||||
| MAINTAINER Eric Taieb Walch <teknologist@gmail.com> | ||||
|  | ||||
| RUN mkdir /app && \ | ||||
| cd /app && \ | ||||
| git clone https://github.com/rshipp/python-nut2.git && \ | ||||
| cd python-nut2 && \ | ||||
| python setup.py install && \ | ||||
| cd .. && \ | ||||
| git clone https://github.com/rshipp/webNUT.git && cd webNUT && \ | ||||
| pip install -e . | ||||
|  | ||||
|  | ||||
|  | ||||
| COPY /docker-entrypoint.sh /docker-entrypoint.sh | ||||
| RUN chmod +x /docker-entrypoint.sh | ||||
|  | ||||
| WORKDIR /app/webNUT | ||||
|  | ||||
| ENTRYPOINT ["/docker-entrypoint.sh"] | ||||
|  | ||||
| EXPOSE 6543 | ||||
							
								
								
									
										24
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								README.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,24 @@ | ||||
| # docker-webNUT | ||||
|  | ||||
|  | ||||
| webNUT (UPS network monitoring web ui) dockerized. | ||||
|  | ||||
| More infos on webNUT:  https://github.com/rshipp/webNUT | ||||
|  | ||||
| Set the following environment variables: | ||||
|  | ||||
| **UPS_HOST**    with NUT server host IP  *(default: 127.0.0.1)* | ||||
|  | ||||
| **UPS_PORT**	  with NUT server port  *(default: 3493)* | ||||
|  | ||||
| **UPS_USER**    with NUT server username   *(default: monuser)* | ||||
|  | ||||
| **UPS_PASSWORD**     with NUT server  password   *(default: secret)* | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
| Run with: | ||||
|  | ||||
| > docker run -e UPS_HOST="10.11.12.13"  -e UPS_PORT="3493" -e UPS_USER="monuser" -e UPS_PASSWORD="secret" -p 6543:6543 teknologist/webnut:latest | ||||
|  | ||||
							
								
								
									
										20
									
								
								docker-entrypoint.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								docker-entrypoint.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,20 @@ | ||||
| #!/usr/bin/env bash | ||||
| set -xe | ||||
|  | ||||
|  | ||||
| upshost="${UPS_HOST:-127.0.0.1}" | ||||
| upsport="${UPS_PORT:-3493}" | ||||
| upsuser="${UPS_USER:-monuser}" | ||||
| upspassword="${UPS_PASSWORD:-secret}" | ||||
|  | ||||
| echo "server = '$upshost'" > /app/webNUT/webnut/config.py | ||||
| echo "port = '$upsport'" >> /app/webNUT/webnut/config.py | ||||
| echo "username = '$upsuser'" >> /app/webNUT/webnut/config.py | ||||
| echo "password = '$upspassword'" >> /app/webNUT/webnut/config.py | ||||
|  | ||||
| cat /app/webNUT/webnut/config.py | ||||
|  | ||||
| cd /app/webNUT && python setup.py install | ||||
|  | ||||
| cd webnut | ||||
| exec pserve ../production.ini | ||||
		Reference in New Issue
	
	Block a user