c4k-website/infrastructure/c4k-website-build/image/resources/entrypoint.sh
erik 46f0c72c3e [Skip-Ci] Update Docker image, cron job, tests
It seems, timeout sends signals that do not stop the server process.
Set the signal to SIGKILL - which also kills the function.sh process.
Thus moved the last function to entrypoint.sh
2022-09-28 14:32:41 +02:00

21 lines
449 B
Bash
Executable file

#!/bin/bash
mkdir $BUILDDIR
mkdir $SOURCEDIR
source /usr/local/bin/functions.sh
function move-website-files-to-target() {
(cd $BUILDDIR; dir=$(ls); cd $dir; rsync -ru --exclude-from "/etc/exclude.pattern" --delete resources/public/* $WEBSITEROOT;)
}
echo "Downloading website"
get-and-unzip-website-data
echo "Building website"
build-and-extract-website
echo "Moving files"
move-website-files-to-target
while true; do
sleep 1m
done