No description
- CSS 39.8%
- Python 35.2%
- HTML 25%
| app | ||
| .gitignore | ||
| config.py.example | ||
| dockerfile | ||
| README.md | ||
| requirements.txt | ||
| run.py.example | ||
| tools_create-admin.py | ||
| tools_create-test-replies.py | ||
| tools_create-test-threads.py | ||
| tools_flask-migrate-wrapper.py | ||
| tools_manual-post.py | ||
| tools_manual-unban.py | ||
| tools_purge-board.py | ||
| wsgi.py | ||
uhhhh intro
It's a poorly thrown together image/text board.
shortlist of prereqs
python3, an open mind
setup
good luck
# have python3.something installed and then:
$ python3 -m venv ~/weevenv # or wherever you want it
$ source ~/weevenv/bin/activate
$ pip install -r requirements.txt
$ cp run.py.example run.py
$ cp config.py.example config.py
$ vim config.py # give yourself a nice flask key
$ vim run.py # Adjust how you need it to run
$ flask db init
$ flask db migrate -m "Setup"
$ flask db upgrade
$ python3 tools_create-admin.py # to create yourself an account
$ python3 run.py
It can be ran under gunicorn, just install it and make a basic wsgi.py file in the root of the project that looks like:
from app import create_app
app = create_app()
then run it like: gunicorn --bind 0:0:0:0 wsgi:app
And if you then want to run it under systemd, here's an example unit file for you:
[Unit]
Description=Gunicorn instance to serve Flask weeboard app
After=network.target
[Service]
User=your_user
Group=your_group
WorkingDirectory=/home/your_user/weeboard
ExecStart=/home/path/to/your/venv/bin/gunicorn --workers 3 --bind 0.0.0.0:5000 wsgi:app
Restart=always
RestartSec=3
KillMode=mixed
[Install]
WantedBy=multi-user.target
purpose
idk lol
todo
dockerfile is a bit barebones
make it production ready
maybe split up the routes as they're ugly
unhardcode some secrets (there's none in the source, but when it's running there's some, or maybe there is, idk)
clean up cruft
learn how to code lol lmao