Skip to content

Instantly share code, notes, and snippets.

@sujal
Last active December 20, 2015 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sujal/1ab6548e55984643fd6c to your computer and use it in GitHub Desktop.
Save sujal/1ab6548e55984643fd6c to your computer and use it in GitHub Desktop.
The script I use to push code live
#!/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