add: docker folder for image build
All checks were successful
Deploy / Deploy (push) Successful in 6s

This commit is contained in:
2025-06-02 08:02:23 +00:00
parent 6b194c5069
commit b9b4d0bf8b
3 changed files with 66 additions and 0 deletions

16
docker/entrypoint.sh Normal file
View File

@@ -0,0 +1,16 @@
#!/bin/sh
set -e
# Configuration
REPO_URL="${REPO_URL:-https://git.vezpi.me/Vezpi/blog.git}"
BRANCH="${BRANCH:-preview}"
CLONE_DIR="${CLONE_DIR:-/blog}"
echo "Cloning $REPO_URL (branch: $BRANCH)..."
git clone --depth 1 --branch "$BRANCH" "$REPO_URL" "$CLONE_DIR"
echo "Building site with Hugo $HUGO_VERSION..."
hugo --source "$CLONE_DIR" --destination "$HUGO_DEST" --cleanDestinationDir
echo "Starting Nginx..."
exec nginx -g 'daemon off;'