Last active
December 20, 2015 13:17
-
-
Save sujal/1ab6548e55984643fd6c to your computer and use it in GitHub Desktop.
The script I use to push code live
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 | |
MACHINE_NAME=$1 | |
if [ -z "$MACHINE_NAME" ]; then | |
echo "MACHINE NAME required as command line argument" | |
exit 1 | |
fi | |
eval "$(docker-machine env $MACHINE_NAME)" | |
docker-compose -f docker-compose-production.yml build web | |
docker-compose -f docker-compose-production.yml up -d web | |
docker exec ${MACHINE_NAME}_web_1 rsync -va /usr/src/wordpress/wp-content/themes/sujaldotcom-iA4-child/ /var/www/html/wp-content/themes/sujaldotcom-iA4-child/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment