Commit 1877f05146dfd9b349400e587984cc92c0697166

Authored by hitier
1 parent f2ebe25e
Exists in rhitier-dev and in 1 other branch DEV

Add new post-deploy script

Showing 2 changed files with 18 additions and 1 deletions   Show diff stats
resources/post-deploy.sh 0 → 100644
@@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
  1 +#!/bin/sh
  2 +
  3 +# SCript to run after heliopropa source where updated.
  4 +#
  5 +# Should be execute within root directory of project
  6 +#
  7 +# May be run by the git post-receive hook
  8 +
  9 +
  10 +
  11 +source ./venv/bin/activate
  12 +pip install -r requirements.txt
  13 +
  14 +# may be more commands to run ...
  15 +# flask db upgrade
  16 +sudo systemctl restart heliopropa
  17 +sudo systemctl restart nginx
resources/post-receive.git-hook
@@ -55,7 +55,7 @@ do @@ -55,7 +55,7 @@ do
55 git checkout ${BRANCH} # set branch if not done yet, sorry guy 55 git checkout ${BRANCH} # set branch if not done yet, sorry guy
56 git pull ${REPOSITORY} ${BRANCH} # get latest modifications, assumes remote origin previously set 56 git pull ${REPOSITORY} ${BRANCH} # get latest modifications, assumes remote origin previously set
57 exec git update-server-info 57 exec git update-server-info
58 - ##/bin/sh scripts/post-deploy.sh 58 + /bin/sh ./post-deploy.sh
59 # Alternately, it is possible to just update a git repo 59 # Alternately, it is possible to just update a git repo
60 echo "DONE -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+" 60 echo "DONE -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+"
61 else 61 else