*/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
|
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() {
|
healthcheck() {
|
||||||
# put pleroma_health=YES in /etc/conf.d/pleroma if you want healthchecking
|
# put pleroma_health=YES in /etc/conf.d/pleroma if you want healthchecking
|
||||||
# and make sure you have curl installed
|
# and make sure you have curl installed
|
||||||
|
|
|
||||||
|
|
@ -24,3 +24,9 @@ depend() {
|
||||||
want nginx
|
want nginx
|
||||||
need postgresql
|
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
Add a link
Reference in a new issue