first commit

This commit is contained in:
mukesh13
2025-06-23 15:27:37 +05:30
commit 5470989a05
1099 changed files with 154763 additions and 0 deletions

43
entry.sh Normal file
View File

@ -0,0 +1,43 @@
#!/bin/sh
set -e
export GATSBY_DIR="/site"
export PATH="$PATH:/usr/local/bin/gatsby"
# Initialize Gatsby or run NPM install if needed
if [ ! -f "$GATSBY_DIR/package.json" ]
then
echo "Initializing Gatsby..."
gatsby new $GATSBY_DIR
else
if [ ! -e "$GATSBY_DIR/node_modules/" ]
then
echo "Node modules is empty. Running npm install..."
npm install
fi
fi
# Decide what to do
if [ "$1" == "develop" ]
then
rm -rf $GATSBY_DIR/public
gatsby develop --host 0.0.0.0
elif [ "$1" == "build" ]
then
rm -rf $GATSBY_DIR/public
gatsby build
elif [ "$1" == "stage" ]
then
rm -rf $GATSBY_DIR/public
gatsby build
gatsby serve --port 8000
else
exec $@
fi