aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorMantas Vilčinskas <hi@mnts.lt>2021-04-17 14:18:48 +0300
committerGitHub <noreply@github.com>2021-04-17 14:18:48 +0300
commit18500f7d6fbef6e31d3a319d3ac209cbd00abb06 (patch)
treed0d41a7055f2314a92b6f475ece58506280080f1 /docker
parent48f41399bad4317205026933f018ad2c192d8f08 (diff)
parent740f8fe924ecda15de73002f648454cf5612142f (diff)
v5 goes live - #151
Diffstat (limited to 'docker')
-rw-r--r--docker/entrypoint.sh14
1 files changed, 8 insertions, 6 deletions
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