satrun77 / tinyissue

Simple Issue Tracking for Teams
MIT License
48 stars 8 forks source link

SUGGESTION: Modify folder structure a little #131

Closed nickbe closed 8 years ago

nickbe commented 8 years ago

Would it be possible to:

  1. seperate the uploaded attachments and the sqlite databases from the rest of the storage folder? /storage seems to include temporary cache files as well as user uploads and the database itself. It seems better to have a /data folder with and /data/upload subfolder for the attachments. When upgrading manually and simply replacing the folder it seems safer as not to delete the database and attachments by accident.
  2. I think it could be interesting to create one database files per project. Example: /database.1 /database.2 and so on.... This would mean the access times will always stay the same no matter how many projects there are. Did you ever think about this approach? Would it bring some other benefits?
satrun77 commented 8 years ago

1) You can do this right now. You can change these in the config files Files: https://github.com/satrun77/tinyissue/tree/master/config Cache file: https://github.com/satrun77/tinyissue/blob/master/config/cache.php#L43 Database file: https://github.com/satrun77/tinyissue/blob/master/config/database.php#L51

2) Sorry don't see any benefits here.

nickbe commented 8 years ago
  1. thanks for the information. I honestly didn't know that.
  2. all right. Just thought I'd ask.
nickbe commented 8 years ago

Which setting determines the storage of the upload files under storage/app? database + uploads is probably all I'd need, yes?

satrun77 commented 8 years ago

From .env file you can move the database to anywhere you want. The variable name DB_DATABASE

The application storage directory can be defined here: https://github.com/satrun77/tinyissue/blob/develop/config/filesystems.php#L48

The directory inside ./app can be changed with .env variable named APP_UPLOAD_DIR. For example the automate tests uses directory named testing instead of uploads https://github.com/satrun77/tinyissue/blob/master/.env.testing#L8

nickbe commented 8 years ago

I moved my database and upload files to a seperate folder. Did I get this right... some options can be defined in the config files and also overwritten in the .env file?

satrun77 commented 8 years ago

Yes.

I'm working on upgrading Laravel to 5.2. There are more options from the config files that can be overwritten in the .env. Also, the default database sqlite location moved from storage directory to database directory.

The directory config contains everything that you can configure. Any configuration value that uses the function env() means you can overwrite in .env. For example, in https://github.com/satrun77/tinyissue/blob/master/config/cache.php#L16 The cache driver is default to 'file' you can overwrite in .env with CACHE_DRIVER=you_new_value

nickbe commented 8 years ago

Ah. great. Maybe one day you could write this down into the documentation together with all the possible options. Thanks again,