Skip to content

Instantly share code, notes, and snippets.

@overdrivemachines
Created February 17, 2023 00:06
Show Gist options
  • Save overdrivemachines/65b10b75fa7c116fd57a4119534d665d to your computer and use it in GitHub Desktop.
Save overdrivemachines/65b10b75fa7c116fd57a4119534d665d to your computer and use it in GitHub Desktop.
Update code (git pull) on production server
#!/bin/bash
# Place this file in /var/www/myapp folder
cd code
git pull
bundle config set --local deployment 'true'
bundle config set --local without 'development test'
bundle install
bundle exec rake assets:precompile db:migrate RAILS_ENV=production
passenger-config restart-app $(pwd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment