Hi Nathan Akrill, the issue you're facing is happening because the volume sub path you're mounting doesn't correctly line up with where Laravel expects to find the database file.
You've confirmed that the file database.sqlite
exists inside /store/database
, and Laravel is looking for it at /var/www/html/database/database.sqlite
. But from your message, it seems you've mounted /store/storage
to /var/www/html/database
, which is incorrect. That means Laravel is trying to find the SQLite file in a path that now actually points to the contents of /store/storage
, not /store/database
.
To fix this, go to your Azure App Service container configuration and update the volume mounts so that the correct file share subfolders are mounted to the right container paths. You should configure the volume mounts exactly like this:
Volume sub path: store/storage
< Container mount path: /var/www/html/storage
Volume sub path: store/database
< Container mount path: /var/www/html/database
This ensures that Laravel’s expected runtime paths point directly to the folders in your Azure File Share where the actual files exist.
Also make sure the file database.sqlite
exists inside /store/database
and is a valid SQLite file (not empty or locked), or allow Laravel to create it on first use. Keep your entrypoint.sh
script in place to apply permissions at container startup. That script should set correct ownership and write permissions for both the storage
and database
directories.
Once you apply the correct volume mapping and restart the app, Laravel will be able to find and access both the log and the database files without issue. You do not need to change any Laravel configuration files this is entirely about aligning the file system mounts properly.
Hope this helps!
If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions, please reply back.