mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2025-04-19 11:35:04 -04:00
*/init.d/pleroma: run migrations before starting
This commit is contained in:
parent
a1247220f3
commit
9bbeeeb428
3 changed files with 13 additions and 0 deletions
1
changelog.d/opt-init.d-migrations.change
Normal file
1
changelog.d/opt-init.d-migrations.change
Normal file
|
@ -0,0 +1 @@
|
|||
- OpenRC: Automatically run migrations before starting pleroma
|
|
@ -37,6 +37,12 @@ depend() {
|
|||
need nginx postgresql
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
ebegin "running migrations if any"
|
||||
su -s /bin/sh -c '/usr/bin/mix ecto.migrate' -l "${command_user}"
|
||||
eend "$?"
|
||||
}
|
||||
|
||||
healthcheck() {
|
||||
# put pleroma_health=YES in /etc/conf.d/pleroma if you want healthchecking
|
||||
# and make sure you have curl installed
|
||||
|
|
|
@ -24,3 +24,9 @@ depend() {
|
|||
want nginx
|
||||
need postgresql
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
ebegin "running migrations if any"
|
||||
su -s /bin/sh -c '/opt/pleroma/bin/pleroma_ctl migrate' -l "${command_user}"
|
||||
eend "$?"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue