Simple little Flask app that takes pastebin-like of data from user and stores it in a sqlite file.
Just run python ./app/main.py
and head out to your browser with the url https://127.0.0.1:5000.
Check the Using Docker section for more info.
Configuration is done via environment variables. The following are the available parameters:
- `BLURBY_DB_FILE`: Path to the sqlite database. (defaults to `/blurby/data/sqlite.db`)
- `BLURBY_HOST_IP`: Host to bind the server to. (defaults to `0.0.0.0`)
- `BLURBY_TTL_HOURS`: How long to keep a paste in the database. (defaults to `48`)
- `BLURBY_THREADS`: Number of threads to use for processing. (defaults to `8`)
When run from the command line, the following additional parameters are available:
- `--debug`: Run in debug mode.
The application now checks if a BLURBY_DB_FILE
environment variable is set. If it is, it uses that as a DB file. If the file is missing but the path is valid it creates the db file.
Manually: To create a blank Sqlite DB for the app use the python ./app/setup_database.py
command.
To use docker simply run the container with prefered volume maps.
ex.
docker container run -v /some/path/logs:/data/logs -v /your/path/data:/data joniturunen/blurby
Note the data folder requires a SQLlite database to be created, check documentation for setting up SQLite.
- Possibility to create logfile entries
- Better error handling
- Add view history to entries
- Better structure for the app (create_app())
- Context upgrade to g or app_ctx
Photo by krakenimages on Unsplash
Icons:
Other:
Theme: Massively by HTML5 UP html5up.net | @ajlkn Free for personal and commercial use under the CCA 3.0 license