setting php dalam docker

This commit is contained in:
Saufi
2026-05-19 15:07:15 +08:00
parent b0eec13d5b
commit 24bac933a8
2 changed files with 8 additions and 0 deletions

View File

@@ -53,6 +53,10 @@ if [ "${APP_ENV}" != "production" ] && [ ! -d /var/www/vendor ]; then
--prefer-dist
fi
# ── 2b. Fix storage permissions (penting untuk named volume di production) ────
chown -R www-data:www-data /var/www/storage /var/www/bootstrap/cache 2>/dev/null || true
chmod -R 775 /var/www/storage /var/www/bootstrap/cache 2>/dev/null || true
# ── 3. Generate APP_KEY jika kosong ───────────────────────────────────────────
if [ -z "${APP_KEY}" ] || [ "${APP_KEY}" = "" ]; then
echo "🔑 Menjana APP_KEY..."