Skip to content

Instantly share code, notes, and snippets.

@hapticdata
Created April 26, 2014 19:24
Show Gist options
  • Save hapticdata/11328679 to your computer and use it in GitHub Desktop.
Save hapticdata/11328679 to your computer and use it in GitHub Desktop.
use a Makefile to run ssh commands on a vagrant box
SERVER_DIR=/var/www/host/server
CONSOLE=$(SERVER_DIR)/app/console
update:
vagrant ssh -- "cd $(SERVER_DIR) && \
sudo composer selfupdate -n -v && \
composer install -n -v"
cache:
vagrant ssh -- "$(CONSOLE) doctrine:migrations:migrate -n && \
$(CONSOLE) cache:clear -e=prod && \
$(CONSOLE) assetic:dump -e=dev"
.PHONY: update cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment