Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Jeremiah Lee
@Jeremiah@alpaca.gold  ·  activity timestamp last week

Is there a good reason why Mastodon’s Docker setup cannot run its database migrations upon upgrade?

My server was down for 4 hours because Elestio autoupdates Mastodon, but didn't run the `rails db:migrate` command.

https://github.com/mastodon/mastodon/releases/tag/v4.5.0#:~:text=When%20using%20Docker

#mastoAdmin #mastoDev

  • Copy link
  • Flag this post
  • Block
Pedro Piñera
@pedro@mastodon.pepicrft.me replied  ·  activity timestamp last week

@Jeremiah perhaps they run the migrations in a separate process before the app launches and that became the default.

  • Copy link
  • Flag this comment
  • Block
Jorijn Schrijvershof
@jorijn@toot.community replied  ·  activity timestamp last week

@Jeremiah containers are meant to be scalable, and ephemeral. When used with orchestration systems, your suggestion wouldn’t be very practical.

For example, I run 10+ web containers that get restarted all the time for various reasons.

Migrations only get triggered via specials hooks when the version is bumped.

  • Copy link
  • Flag this comment
  • Block
Chris is.
@offby1@wandering.shop replied  ·  activity timestamp last week

@Jeremiah One reason that comes to mind for me is "distributed systems". The shop is hosted on 7 smaller hosts... Which one of them should migrate on update? I don't think there's a safe multi-node way to do it.

  • Copy link
  • Flag this comment
  • Block
Log in

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.0 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login