Skip to content

Instantly share code, notes, and snippets.

@millejano
Forked from hapticdata/Makefile
Created October 9, 2016 07:43
Show Gist options
  • Save millejano/21e8319690f905f2f3f60d28a1b6f3f3 to your computer and use it in GitHub Desktop.
Save millejano/21e8319690f905f2f3f60d28a1b6f3f3 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