From 9556f030fb2bd6aa7e91a4870c6da5a993db3b1b Mon Sep 17 00:00:00 2001 From: Cameron Fleming Date: Fri, 11 Dec 2020 22:40:35 +0000 Subject: Docker: line endings & verbose messages These changes replace the CRLF line endings on entrypoint.sh (#160) and adds more debugging messages for diagnosing issues with the docker side of cState in the future. --- docker/entrypoint.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'docker') diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index f8068c1..a90e37d 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -1,21 +1,23 @@ WORK_DIR="/app" SRC_DIR="/cstate" +echo "[CSTATE-DOCKER] Initalising container..." + # Check if the working dir is empty, if it is we'll need to copy # the files in from src directory (usually /cstate) if ! [ "$(ls -A $WORK_DIR)" ]; then # First run, copy cstate's files in. - echo "First time run! Hello, World :)" + echo "[CSTATE-DOCKER] Copying cState into staging area. First Start." cp -R $SRC_DIR/* $WORK_DIR fi -# Continue with building - -# CD into working dir -cd /app +cd $WORK_DIR # Build the hugo site +echo "[CSTATE-DOCKER] Running hugo build service..." hugo # Copy built files into NGINX directory -cp -r /app/public/* /usr/share/nginx/html \ No newline at end of file +cp -r /$WORK_DIR/public/* /usr/share/nginx/html + +echo "[CSTATE-DOCKER] Initalisation complete." \ No newline at end of file -- cgit v1.2.3-70-g09d2