Add migrations to post-deploy hook

This commit is contained in:
Trevor Vallender 2023-10-20 11:19:04 +01:00
parent e0c12a9760
commit 5d0a1b1612
1 changed files with 15 additions and 0 deletions

15
.kamal/hooks/post-deploy Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh
# A sample post-deploy hook
#
# These environment variables are available:
# KAMAL_RECORDED_AT
# KAMAL_PERFORMER
# KAMAL_VERSION
# KAMAL_HOSTS
# KAMAL_ROLE (if set)
# KAMAL_DESTINATION (if set)
# KAMAL_RUNTIME
echo "$KAMAL_PERFORMER deployed $KAMAL_VERSION to $KAMAL_DESTINATION in $KAMAL_RUNTIME seconds"
kamal app exec --reuse "bin/rails db:migrate"