|
|
|
@@ -23,9 +23,52 @@ do not deploy this way, the packaged flask server is not secure. production inst
|
|
|
|
- re-building the entire database with `flask --app myriad init-db` (losing all the data inside) will be necessary as development continues. DO NOT STORE ANYTHING IMPORTANT DURING DEVELOPMENT
|
|
|
|
- re-building the entire database with `flask --app myriad init-db` (losing all the data inside) will be necessary as development continues. DO NOT STORE ANYTHING IMPORTANT DURING DEVELOPMENT
|
|
|
|
- start the site with `flask --app myriad run --debug` as usual
|
|
|
|
- start the site with `flask --app myriad run --debug` as usual
|
|
|
|
|
|
|
|
|
|
|
|
# prod set up
|
|
|
|
# prod set up (linux)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
it is recommended to run waitress in a tmux window for easier management
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
create new tmux window:
|
|
|
|
|
|
|
|
tmux new -s myriad
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
detach from tmux window:
|
|
|
|
|
|
|
|
ctrl+b -> d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
attach to existing tmux window:
|
|
|
|
|
|
|
|
tmux attach -t myriad
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
git clone https://tea.cubes.link/cube/myriad.git
|
|
|
|
|
|
|
|
cd myriad
|
|
|
|
|
|
|
|
python3 -m venv venv
|
|
|
|
|
|
|
|
source venv/bin/activate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pip install flask
|
|
|
|
|
|
|
|
pip install waitress
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mkdir instance
|
|
|
|
|
|
|
|
mkdir myriad/static/icons
|
|
|
|
|
|
|
|
mkdir myriad/static/blinkies
|
|
|
|
|
|
|
|
mkdir myriad/static/stamps
|
|
|
|
|
|
|
|
mkdir myriad/static/tmp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sudo nano instance/config.py
|
|
|
|
|
|
|
|
(copy and paste sample from readme)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
python -c 'import secrets; print(secrets.token_hex())'
|
|
|
|
|
|
|
|
copy value generated above (maybe do the generation on a local machine so it easier to copy/paste)
|
|
|
|
|
|
|
|
add new line to config.py:
|
|
|
|
|
|
|
|
SECRET_KEY = '(paste generated key here)'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
flask --app myriad init-db
|
|
|
|
|
|
|
|
waitress-serve --port=80 --call 'myriad:create_app'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
after running and setting up first user stop waitress (CTRL+C), then `sudo nano instance/config.py` and set `REGISTRATION = False`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## updating
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
stop waitress (CTRL+C) and use `git pull` to pull changes
|
|
|
|
|
|
|
|
start waitress again to reload
|
|
|
|
|
|
|
|
if it is a database changing update, use backup features, re-init db, then re-import from backup
|
|
|
|
|
|
|
|
|
|
|
|
- not ready yet
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# config
|
|
|
|
# config
|
|
|
|
|
|
|
|
|
|
|
|
@@ -37,8 +80,6 @@ ALLOWED_EXTENSIONS = {'png', 'jpg', 'jpeg', 'gif'} # Can be anything you want
|
|
|
|
ICON_UPLOAD_FOLDER = 'myriad/static/icons' # where member icons will be stored
|
|
|
|
ICON_UPLOAD_FOLDER = 'myriad/static/icons' # where member icons will be stored
|
|
|
|
BLINKIES_UPLOAD_FOLDER = 'myriad/static/blinkies' # where site assets "blinkies" will be stored
|
|
|
|
BLINKIES_UPLOAD_FOLDER = 'myriad/static/blinkies' # where site assets "blinkies" will be stored
|
|
|
|
STAMPS_UPLOAD_FOLDER = 'myriad/static/stamps' # where site assets "stamps" will be stored
|
|
|
|
STAMPS_UPLOAD_FOLDER = 'myriad/static/stamps' # where site assets "stamps" will be stored
|
|
|
|
INLINE_UPLOAD_FOLDER = 'myriad/static/inline' # where site assets "misc inline" will be stored
|
|
|
|
|
|
|
|
MISC_UPLOAD_FOLDER = 'myriad/static/misc' # where other small images will be stored
|
|
|
|
|
|
|
|
THEMES_FOLDER = 'myriad/static/themes' # where theme choices will be stored
|
|
|
|
THEMES_FOLDER = 'myriad/static/themes' # where theme choices will be stored
|
|
|
|
TMP_FOLDER = 'myriad/static/tmp' # folder for creating export files
|
|
|
|
TMP_FOLDER = 'myriad/static/tmp' # folder for creating export files
|
|
|
|
```
|
|
|
|
```
|
|
|
|
@@ -69,7 +110,4 @@ TMP_FOLDER = 'myriad/static/tmp' # folder for creating export files
|
|
|
|

|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
- a sample part of the administration
|
|
|
|
- a sample part of the administration
|
|
|
|

|
|
|
|

|
|
|
|
|
|
|
|
|
|
|
|
- the theme editor is pretty ugly right now but it does work
|
|
|
|
|
|
|
|

|
|
|
|
|