-
-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to store all files in storage
#1650
Conversation
storage
storage
by default
0986f3b
to
e7edb19
Compare
e7edb19
to
86f3b38
Compare
Yes. This is likely to break a lot of installations.
This is plainly false, though I get your point.
I'm not convinced a shell command is a good instruction here. I'd just say "move..." But yeah, my main concern here is breaking lots. Well, that and cluttering up the Docker scripts with things that are only needed once but will need to be run every time because we don't know the state. It feels like a very small improvement for new installations at the cost of a high risk operation (admittedly of breakage, rather than loss) for all existing users. |
I actually tried to prevent issues, this includes a migration which moves the files. I wasn't sure if there are special setups like S3 storage or something like this which was the main reason for me to write this. In general, I definitely understand your concerns. My main issue is that Lychee stores everything somewhere else. Maybe, a good idea would be some kind of option in What you would mainly need to change to support this are symlinks to |
That sounds messier. if we're going to do it, we should just do it, but we need to accept that it's a big change, likely a breaking change and needs to be handled accordingly (including being sure that we're not going to do this again). And it needs to be worth it. I think it's probably a worthwhile change to simplify things, I'm just not sure it's worth the upheaval. I'd be interested how the others feel. |
I am not convinced by that change. :( Backup currently is basically just the |
I think that was so that all of the backup items (photos, db, etc) were in one place away from unimportant Laravel stuff in storage. |
Yes, also As for the backup: this works as long as you don't use the |
I would not back up those. Does not make much sense, and you can just regenerate them on first use, just need to clean the DB on sym_links. :) |
I see that this will be a very problematic change, so let me suggest a simpler changing only a few files and being fully optional:
This will make all moving of files to |
storage
by defaultstorage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quickly tested. LGTM.
Change storage paths etc. to only require the
storage
directory to be writable to the web user by default.Especially migrating them is a bit special and might result in various issues.
public/{uploads,sym}
is now instorage/app/public/{uploads,sym}
,user.css
is instorage/app/public/user.css
. These files are linked with a symbolic link topublic/storage/
which is the recommended way of Laravel.TODO:
storage/app/database.sqlite
Advantages
This allows you to only make
storage/
writable to the web user which enhances security. In addition, it allows you to easily backup the whole instance: copystorage/app/
. Currently, you have to copy multiple paths which makes this pretty hard.Breaking: the DB path changed, and this must be renamed by the user. Otherwise Laravel won't find the new database file and can't migrate the old one. So, the release notes should contains something like:
If you're using SQLite with an empty DB_DATABASE configuration (using default values), please run the following command in your shell to move the database file to the new default location: mv database/database.sqlite storage/app/database.sqlite