auto config import

This commit is contained in:
2025-06-22 03:22:50 +02:00
parent 9b078254ac
commit 459873f0e5
3 changed files with 26 additions and 2 deletions

17
server/start.sh Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
# Start Strapi in the background
npm start &
STRAPI_PID=$!
# Wait for Strapi to be ready (check if port 1337 is listening)
echo "Waiting for Strapi to be ready..."
while ! nc -z localhost 1337; do
sleep 2
done
echo "Strapi is ready! Running config-sync import..."
npm run cs import
# Wait for the Strapi process
wait $STRAPI_PID