fix(koillection): override FrankenPHP runtime with Symfony runtime

Koillection 1.8.0 configures FrankenPHP runtime in composer.json extra,
but we use Apache. Fix by:
- Adding APP_RUNTIME to .env.local for CLI commands
- Adding SetEnv APP_RUNTIME in Apache VirtualHost for web requests
- Creating uploads directory before chown
- Update script checks and adds runtime config for upgrades
This commit is contained in:
CanbiZ (MickLesk)
2026-01-30 13:53:20 +01:00
parent 80cba8d29d
commit 3fc0b29d88
2 changed files with 13 additions and 2 deletions

View File

@@ -32,8 +32,8 @@ sed -i -e "s|^APP_ENV=.*|APP_ENV=prod|" \
-e "s|^DB_USER=.*|DB_USER=${PG_DB_USER}|" \
-e "s|^DB_PASSWORD=.*|DB_PASSWORD=${PG_DB_PASS}|" \
/opt/koillection/.env.local
echo 'APP_RUNTIME="Symfony\Component\Runtime\SymfonyRuntime"' >> /opt/koillection/.env.local
export COMPOSER_ALLOW_SUPERUSER=1
export APP_RUNTIME='Symfony\Component\Runtime\SymfonyRuntime'
$STD composer install --no-dev -o --no-interaction --classmap-authoritative
$STD php bin/console doctrine:migrations:migrate --no-interaction
$STD php bin/console app:translations:dump
@@ -49,6 +49,7 @@ cat <<EOF >/etc/apache2/sites-available/koillection.conf
<VirtualHost *:80>
ServerName koillection
DocumentRoot /opt/koillection/public
SetEnv APP_RUNTIME "Symfony\\Component\\Runtime\\SymfonyRuntime"
<Directory /opt/koillection/public>
Options Indexes FollowSymLinks
AllowOverride All