OpenVisor-Website/post-receive

26 lines
845 B
Plaintext

# openvisorwebsite-dockerized/hooks/post-receive
# https://git.openvisor.ch/OpenVisor/OpenVisor-Website/post-receive
#!/bin/bash
# old undockerized
#git --work-tree=/var/www/html/openvisor --git-dir=/var/www/html/openvisor checkout -f
#cd /var/www/html/openvisor
#yarn build
# new dockerized
REPOSITORY=/opt/openvisorwebsite-dockerized
git --work-tree=${REPOSITORY} --git-dir=${REPOSITORY} checkout -f
touch ${REPOSITORY}/FLAG-FOR-CRONJOB-DOCKER-AUTOMATION
# content of /etc/cron.daily/openvisorwebsite-docker-automation
##!/bin/sh
#REPOSITORY=/opt/openvisorwebsite-dockerized
#if [ -f ${REPOSITORY}/FLAG-FOR-CRONJOB-DOCKER-AUTOMATION ];
# then
# docker compose build
# docker compose stop
# docker rm openvisorwebsite-app
# docker compose up -d
# rm ${REPOSITORY}/FLAG-FOR-CRONJOB-DOCKER-AUTOMATION
#fi