Created
May 4, 2015 11:12
-
-
Save jwerak/f28db0b93120a96ba8d0 to your computer and use it in GitHub Desktop.
run example pyton app in docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
curl https://gist.githubusercontent.com/veverjak/b8607526f071f296bd8c/raw/52dd97718f1f7e46c5f7d04888ca02c74bea7225/get_file_content.py -o /app.py | |
pip install flask | |
while true; do | |
etcdctl --peers `cat /etc/ip`:4001 get /test > /test | |
if [[ -n $PID ]]; | |
then kill -9 $PID; | |
fi | |
python /app.py /test & | |
PID=`echo $!` | |
etcdctl --peers `cat /etc/ip`:4001 watch /test | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment