litestream-ruby
litestream-ruby copied to clipboard
Starting replication process with Procfile
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)