Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ----------------------------------------------------------------------#
- # Live environment #
- # ----------------------------------------------------------------------#
- production/host = foo.com
- production/user = bar
- production/port = 22
- production/path = /var/www/foo.com/
- define production/shell
- ssh $(production/user)@$(production/host) -p$(production/port) 'cd $(production/path) &&$1'
- endef
- production/deploy: build/production
- git -C ./ ls-files --exclude-standard -oi --directory > /tmp/excludes;
- rsync -rz \
- --exclude=".git" \
- --exclude-from="/tmp/excludes" \
- -e 'ssh -p$(production/port)' \
- './' \
- '$(production/user)@$(production/host):$(production/path)'
- rsync -rz \
- -e 'ssh -p$(production/port)' \
- './$(asset_path)/Build/' \
- '$(production/user)@$(production/host):$(production/path)$(asset_path)/Build/'
- $(call production/shell, composer install --ignore-platform-reqs)
- $(call production/shell, ./bin/console doctrine:migrations:migrate --no-interaction)
- $(call production/shell, ./bin/console assets:install)
- $(call production/shell, ./bin/console cache:clear --env=prod)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement