diff --git a/Makefile b/Makefile index 1f0ca914..5a9ad7a8 100644 --- a/Makefile +++ b/Makefile @@ -71,6 +71,15 @@ rake: ## Corre rake dentro del entorno de desarrollo (pasar argumentos con args= bundle: ## Corre bundle dentro del entorno de desarrollo (pasar argumentos con args=). $(hain) 'bundle $(args)' +psql := psql -h $(PG_HOST) -U $(PG_USER) -p $(PG_PORT) -d sutty +copy-table: + test -n "$(table)" + echo "truncate $(table) $(cascade);" | $(psql) + ssh $(delegate) docker exec postgresql pg_dump -U sutty -d sutty -t $(table) | $(psql) + +psql: + $(psql) + rubocop: ## Yutea el código que está por ser commiteado git status --porcelain \ | grep -E "^(A|M)" \ @@ -102,8 +111,7 @@ save: ## Subir la imagen Docker al nodo delegado @echo -e "\a" ota-js: assets ## Actualizar Javascript en el nodo delegado - sudo chgrp -R 82 public/ - rsync -avi --delete-after public/ root@$(delegate):/srv/sutty/srv/http/data/_$(public)/ + rsync -avi --delete-after --chown 1000:82 public/ root@$(delegate):/srv/sutty/srv/http/data/_$(public)/ ssh root@$(delegate) docker exec $(container) sh -c "cat /srv/http/tmp/puma.pid | xargs -r kill -USR2" ota: ## Actualizar Rails en el nodo delegado