Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. # ----------------------------------------------------------------------#
  2. # Live environment #
  3. # ----------------------------------------------------------------------#
  4. production/host = foo.com
  5. production/user = bar
  6. production/port = 22
  7. production/path = /var/www/foo.com/
  8.  
  9. define production/shell
  10. ssh $(production/user)@$(production/host) -p$(production/port) 'cd $(production/path) &&$1'
  11. endef
  12.  
  13. production/deploy: build/production
  14. git -C ./ ls-files --exclude-standard -oi --directory > /tmp/excludes;
  15. rsync -rz \
  16. --exclude=".git" \
  17. --exclude-from="/tmp/excludes" \
  18. -e 'ssh -p$(production/port)' \
  19. './' \
  20. '$(production/user)@$(production/host):$(production/path)'
  21. rsync -rz \
  22. -e 'ssh -p$(production/port)' \
  23. './$(asset_path)/Build/' \
  24. '$(production/user)@$(production/host):$(production/path)$(asset_path)/Build/'
  25. $(call production/shell, composer install --ignore-platform-reqs)
  26. $(call production/shell, ./bin/console doctrine:migrations:migrate --no-interaction)
  27. $(call production/shell, ./bin/console assets:install)
  28. $(call production/shell, ./bin/console cache:clear --env=prod)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement