no more problems

This commit is contained in:
2026-02-06 16:03:25 +01:00
parent 8b3616ab73
commit b676145d55
7 changed files with 171 additions and 39 deletions
+8 -1
View File
@@ -1,6 +1,8 @@
#!/bin/sh
set -e
echo "ca"
FRONTEND_DIR=/app
APP_DIR=/var/www/app
PUBLIC_DIR="$APP_DIR/public"
@@ -8,14 +10,18 @@ GIT_URL="https://oauth2:${GIT_TOKEN}@${FRONTEND_GIT_REPO}"
MAX_WAIT=300
WAITED=0
while [ ! -f "$APP_DIR/composer.json" ] || [ ! -d "$APP_DIR/vendor" ] || [ ! -d "$APP_DIR/public" ]; do
while [ ! -f "$APP_DIR/composer.json" ] || [ ! -d "$APP_DIR/vendor" ] || [ ! -f "$APP_DIR/public/index.php" ]; do
if [ $WAITED -ge $MAX_WAIT ]; then
exit 1
echo "je sais pas ce que c"
fi
sleep 3
WAITED=$((WAITED + 3))
echo "sleep"
done
echo "c bon"
if [ ! -d "$FRONTEND_DIR/.git" ]; then
git clone -b "${FRONTEND_GIT_BRANCH:-main}" "$GIT_URL" "$FRONTEND_DIR"
@@ -25,6 +31,7 @@ else
git reset --hard origin/"${FRONTEND_GIT_BRANCH:-main}"
fi
cp "$APP_DIR"/public/index.php "$FRONTEND_DIR"/index.php
cd "$FRONTEND_DIR"
cp /tmp/app.env .env