fix storage-link for ProfilePicture
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
FRONTEND_DIR=/app
|
FRONTEND_DIR=/app
|
||||||
APP_DIR=/var/www/app
|
APP_DIR=/var/www/app
|
||||||
PUBLIC_DIR="$APP_DIR/public"
|
PUBLIC_DIR="$APP_DIR/public"
|
||||||
@@ -18,16 +17,23 @@ else
|
|||||||
git reset --hard origin/"${FRONTEND_GIT_BRANCH:-main}"
|
git reset --hard origin/"${FRONTEND_GIT_BRANCH:-main}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp "$APP_DIR"/public/index.php "$FRONTEND_DIR"/index.php
|
cp "$APP_DIR/public/index.php" "$FRONTEND_DIR/index.php"
|
||||||
|
|
||||||
cd "$FRONTEND_DIR"
|
cd "$FRONTEND_DIR"
|
||||||
|
|
||||||
cp /tmp/app.env .env
|
cp /tmp/app.env .env
|
||||||
|
|
||||||
npm ci --prefer-offline --no-audit
|
npm ci --prefer-offline --no-audit
|
||||||
|
|
||||||
npm run build
|
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/"
|
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
|
exit 0
|
||||||
Reference in New Issue
Block a user