Files
projects/Dockers/strapi/entrypoint.sh
T
Bram 4ca113a7d7
Build and Push Docker Images / build-and-push (push) Successful in 28s
ffs
2025-05-08 16:53:34 +02:00

19 lines
471 B
Bash

#!/bin/sh
# If /opt/app/package.json does not exist, copy the app skeleton into /opt/app
if [ ! -f /opt/app/package.json ]; then
echo "Initializing /opt/app with application files..."
cp -R /opt/app-template/* /opt/app/
cp -R /opt/app-template/.[!.]* /opt/app/ 2>/dev/null || true
fi
cd /opt/app
# If node_modules is missing, install dependencies
if [ ! -d node_modules ]; then
echo "node_modules not found, running npm ci..."
npm ci
fi
exec "$@"