quadfile/README.md

54 lines
1.7 KiB
Markdown
Raw Normal View History

2015-12-24 22:29:20 +00:00
# QuadFile Version 2
2015-12-23 13:11:38 +00:00
2015-12-24 23:13:35 +00:00
A temporary (or permanent, depending on configuration) file sharing service written in Flask.
2015-12-23 13:11:38 +00:00
2015-12-24 23:06:03 +00:00
# Features
* Automatically remove files that aren't accessed often enough
* Supports all filetypes
* Prevents duplicate filenames
* Works on all platforms (as long as they can use basic JavaScript)
* Both easy to set up and use
2016-02-02 20:30:00 +00:00
* Threaded for effective use of resources (Unless you're not on SSD, in which case, enjoy your I/O clogs m8)
2015-12-24 23:06:03 +00:00
* Color-coded and real-time console log
* Easy to use with most applications, such as ShareX
2015-12-23 13:11:38 +00:00
# Requirements
2016-02-02 20:30:00 +00:00
Needed:
2015-12-23 13:11:38 +00:00
* Python 3 (Python 2 might work, dunno, i don't test that, don't care either)
2016-02-02 20:30:00 +00:00
* sqlite3 package for your OS (To create the database)
2015-12-23 13:11:38 +00:00
* Install flask, currently that should be the only requirement and hopefully forever (``pip install -r requirements.txt``)
2016-02-02 20:30:00 +00:00
Recommended:
* nginx, great for proxy_pass
* gunicorn, allows you to use QuadFile with multiple workers
2015-12-23 13:11:38 +00:00
# Using the thing
## Test deployment
2015-12-23 13:11:38 +00:00
* Clone the repo somewhere
* ``pip install -r requirements.txt``
2015-12-23 13:11:38 +00:00
* Do ``cp conf.py.sample conf.py``
* Edit ``conf.py`` so that the information is correct
* ``sqlite3 files.db < schema.sql``
2015-12-23 13:11:38 +00:00
* ``chmod +x run.py`` and then ``./run.py``
* ???
* PROFIT (Hopefully)
## Production deployment
* Clone the repo somewhere
* Set up a virtual environment for QuadFile
* ``pip install -r requirements.txt``
* Do ``cp conf.py.sample conf.py``
* Edit ``conf.py`` so that the information is correct
* ``sqlite3 files.db < schema.sql``
* ``gunicorn wsgi:app -w 4 --bind 127.0.0.1:8282 --log-file $HOME/quadfile.log`` (Use supervisor to run it on boot if needed)
* Configure nginx and proxy_pass it to gunicorn
* ???
* PROFIT (Hopefully)