litestream-ruby icon indicating copy to clipboard operation
litestream-ruby copied to clipboard

Starting replication process with Procfile

Open dhmacs opened this issue 5 months ago • 0 comments

The README of the project says that the replication process can be started with a procfile:

# Procfile
rails: bundle exec rails server --port $PORT
litestream: bin/rails litestream:replicate

It seems though that if bin/rails litestream:replicate executes asynchronously, foreman (or whatever process monitor) would exit, stopping the other processes as well, correct? I'm asking this because this is what's happening when I try this setup (when I run the puma plugin it works).

This seems to affect other commands like restore as well, which makes it hard to implement sequential logic (e.g. restoring the db before running bin/rails db:prepare — useful when migrating to a new server for distaster recovery)

dhmacs avatar Sep 22 '24 18:09 dhmacs