Merge pull request 'OpenRC: Automatically run migrations before starting pleroma' (#7680) from gitlab-mr-iid-4303 into develop
Reviewed-on: https://git.pleroma.social/pleroma/pleroma/pulls/7680
This commit is contained in:
commit
e143e645d3
3 changed files with 17 additions and 2 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,13 @@ depend() {
|
|||
need nginx postgresql
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
ebegin "running migrations if any"
|
||||
su -s /bin/sh -c "cd \"${directory}\" && exec /usr/bin/mix ecto.migrate" \
|
||||
"${command_user%%:*}"
|
||||
eend "$?"
|
||||
}
|
||||
|
||||
healthcheck() {
|
||||
# put pleroma_health=YES in /etc/conf.d/pleroma if you want healthchecking
|
||||
# and make sure you have curl installed
|
||||
|
|
|
|||
|
|
@ -17,6 +17,13 @@ retry="SIGTERM/30/SIGKILL/5"
|
|||
pidfile="/var/run/pleroma.pid"
|
||||
|
||||
depend() {
|
||||
want nginx
|
||||
need postgresql
|
||||
want nginx
|
||||
need postgresql
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
ebegin "running migrations if any"
|
||||
su -s /bin/sh -c "cd \"${directory}\" && exec /opt/pleroma/bin/pleroma_ctl migrate" \
|
||||
"${command_user%%:*}"
|
||||
eend "$?"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue