From 51083f211731f368aecf2962a70c317b0c820a2e Mon Sep 17 00:00:00 2001 From: p2405951 Date: Fri, 27 Mar 2026 17:00:05 +0100 Subject: [PATCH] fix storage-link for ProfilePicture --- docker/frontend/entrypoint.sh | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/docker/frontend/entrypoint.sh b/docker/frontend/entrypoint.sh index 1b275c7..ed10791 100644 --- a/docker/frontend/entrypoint.sh +++ b/docker/frontend/entrypoint.sh @@ -1,6 +1,5 @@ #!/bin/sh set -e - FRONTEND_DIR=/app APP_DIR=/var/www/app PUBLIC_DIR="$APP_DIR/public" @@ -11,23 +10,30 @@ PHP_PORT=9000 /usr/local/bin/wait-for-it.sh "$PHP_HOST:$PHP_PORT" -t 300 if [ ! -d "$FRONTEND_DIR/.git" ]; then - git clone -b "${FRONTEND_GIT_BRANCH:-main}" "$GIT_URL" "$FRONTEND_DIR" + git clone -b "${FRONTEND_GIT_BRANCH:-main}" "$GIT_URL" "$FRONTEND_DIR" else - cd "$FRONTEND_DIR" - git fetch origin - git reset --hard origin/"${FRONTEND_GIT_BRANCH:-main}" + cd "$FRONTEND_DIR" + git fetch origin + git reset --hard origin/"${FRONTEND_GIT_BRANCH:-main}" fi -cp "$APP_DIR"/public/index.php "$FRONTEND_DIR"/index.php +cp "$APP_DIR/public/index.php" "$FRONTEND_DIR/index.php" + cd "$FRONTEND_DIR" - cp /tmp/app.env .env - npm ci --prefer-offline --no-audit - npm run build -find "$PUBLIC_DIR" -mindepth 1 ! -name 'index.php' ! -name '.htaccess' -delete +find "$PUBLIC_DIR" -mindepth 1 \ + ! -name 'index.php' \ + ! -name '.htaccess' \ + ! -name 'storage' \ + -delete + cp -r dist/* "$PUBLIC_DIR/" +if [ ! -L "$PUBLIC_DIR/storage" ] || [ ! -e "$PUBLIC_DIR/storage" ]; then + ln -sfn "$APP_DIR/storage/app/public" "$PUBLIC_DIR/storage" +fi + exit 0 \ No newline at end of file