Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

Upgrade procedure missing in README #197

Closed
jacotec opened this issue Jul 20, 2019 · 1 comment
Closed

Upgrade procedure missing in README #197

jacotec opened this issue Jul 20, 2019 · 1 comment

Comments

@jacotec
Copy link

jacotec commented Jul 20, 2019

After my first attempt to deploy the Crossposter was not very successful, I took some two hours and started over, writing myself some a documentation in case I need to redo the setup somewhere later.

To complete my doc I'd like to know the needed steps for performing an upgrade. The assumed steps are:

  • Stop the services
  • Change to the crossposter user and change into "live" directory
  • "git pull"

In case some dependencies or Ruby version has changed:

bundle install --deployment --without development test
yarn install --pure-lockfile

Precompile:
RAILS_ENV=production bundle exec rake assets:precompile

  • Restart services

Is this correct?
Is there some command for a database migration / update needed?

@renatolond
Copy link
Owner

Usually when there's changes, they are listed in the Changelog, such as these https://github.com/renatolond/mastodon-twitter-poster/blame/master/CHANGELOG.md#L11

Database migrations are done with
RAILS_ENV=production bundle exec rails db:migrate

To upgrade you don't need to stop the services, you can git pull and restart the services after. Usually the steps would be:

  • change to the crossposter user
  • change into the live directory (or equivalent)
  • git pull the new version
  • (if ruby dependencies changed) bundle install
  • (if node dependencies changed) yarn install --pure-lockfile
  • (if assets changed) RAILS_ENV=production bundle exec rake assets:precompile
  • (if database changed) RAILS_ENV=production bundle exec rails db:migrate
  • restart services

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants