Files
projects/Dockers/strapi/entrypoint.sh
T
Bram 752c614b98
Build and Push Docker Images / build-and-push (push) Failing after 8m58s
transition to yarn
2025-08-20 14:17:52 +02:00

19 lines
477 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..."
yarn install
fi
exec "$@"