fix(firefly): set Data Importer APP_URL for subdirectory install

Configure APP_URL and ASSET_URL during install so redirects (e.g. Start Over) resolve to /dataimporter/ instead of the server root.

Fixes #14830

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Michel Roegl-Brunner
2026-06-01 10:15:35 +02:00
parent 162cb9b887
commit 3546f55020

View File

@@ -37,7 +37,13 @@ msg_ok "Configured Firefly III"
msg_info "Configuring Data Importer"
cp /opt/firefly/dataimporter/.env.example /opt/firefly/dataimporter/.env
sed -i "s#FIREFLY_III_URL=#FIREFLY_III_URL=http://${LOCAL_IP}#g" /opt/firefly/dataimporter/.env
sed -i \
-e "s#FIREFLY_III_URL=#FIREFLY_III_URL=http://${LOCAL_IP}#g" \
-e "s|^APP_URL=.*|APP_URL=http://${LOCAL_IP}/dataimporter|" \
-e "s|^ASSET_URL=.*|ASSET_URL=/dataimporter|" \
/opt/firefly/dataimporter/.env
cd /opt/firefly/dataimporter
$STD php artisan config:clear
chown -R www-data:www-data /opt/firefly
msg_ok "Configured Data Importer"