add a frontend container

This commit is contained in:
2026-01-27 15:52:56 +01:00
parent 14e8aa80a9
commit 6d45c131c7
7 changed files with 94 additions and 21 deletions
+9 -2
View File
@@ -2,12 +2,13 @@
set -e
APP_DIR=/var/www/app
GIT_URL="https://${GIT_TOKEN}@${BACKEND_GIT_REPO}"
if [ ! -d "$APP_DIR/.git" ]; then
git clone -b "${GIT_BRANCH:-main}" "$GIT_REPO" "$APP_DIR"
GIT_URL="https://${GIT_TOKEN}@${BACKEND_GIT_REPO}"
else
cd "$APP_DIR"
git pull origin "${GIT_BRANCH:-main}"
git pull "$GIT_URL" "${BACKEND_GIT_BRANCH:-main}"
fi
cd "$APP_DIR"
@@ -20,4 +21,10 @@ if [ -d storage ] && [ -d bootstrap/cache ]; then
chown -R www-data:www-data storage bootstrap/cache
fi
if [ -f .env ]; then
php artisan key:generate --no-interaction
fi
php artisan migrate --force
exec "$@"