Created
June 6, 2014 10:42
-
-
Save himlohiya/9b4ee952c6a51fd6de23 to your computer and use it in GitHub Desktop.
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 | |
# exit on any error | |
set -o errexit | |
# exit if an uninitialised variable is used. | |
set -o nounset | |
# install nginx. | |
sudo apt-get install -y nginx | |
sudo apt-get upgrade | |
echo "upstream app { | |
server 127.0.0.1:49001; | |
} | |
server { | |
listen 9765; | |
server_name build.ezetap.com; | |
location / { | |
proxy_pass http://app; | |
} | |
}" > /etc/nginx/sites-available/ezetapJenkins | |
sudo ln -sf /etc/nginx/sites-available/ezetapJenkins /etc/nginx/sites-enabled/ezetapJenkins | |
sudo service nginx restart | |
# install docker. | |
sudo apt-get install docker.io | |
# pull jenkins image. | |
docker.io pull zaiste/jenkins | |
# run docker jenkins image. | |
# run docker image 49001 port is exposed as 8080 port. | |
docker.io run -d -p 49001:8080 -v $PWD/jenkins:/var/lib/jenkins -t zaiste/jenkins |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment