Skip to content

Instantly share code, notes, and snippets.

@tranphuoctien
Created October 31, 2018 06:34
Show Gist options
  • Save tranphuoctien/6ae0ccbdfa3affff532fcda150d1ccd5 to your computer and use it in GitHub Desktop.
Save tranphuoctien/6ae0ccbdfa3affff532fcda150d1ccd5 to your computer and use it in GitHub Desktop.
#!/bin/bash
shopt -s extglob
#echo -n "Username: ";
#read username;
#echo -n "Password: ";
#Disabling echo, so that password will not be visible on screen
#read -s password
#Enabling echo
echo "";
echo -n "Location deploy in: ";
read location;
mkdir -p "$location";
cd "$location";
echo "Downloading deploy file"
curl -LO https://gist.githubusercontent.com/tranphuoctien/063b79d21518a0db74355b0448fceeec/raw/d8fce75de006decb42ba43851eddeaa79674d91c/docker-compose.yml
echo ""
echo "Updating images exist"
docker rm $(docker ps -a -q)
docker rmi $(docker images -q) -f
echo ""
echo "Shutdown docker current"
docker-compose down
echo ""
echo "Starting deploy"
docker-compose up --build
echo "Container running @ update vendor"
echo "Here's the complete configuration object:"
exit 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment