I've not had much time in the past week to work on the blog platform due to getting back to work after two weeks off. So that means future enhancements to the blog will take a bit longer.
I managed to implement a fairly basic commenting system that works well, so at least now you can offer your thoughts and comments on blog posts. The one thing that's really missing before I redirect the old linsec.ca site to here is searching. I think search capabilities are quite important. Flask can do this with Whooshalchemy, which would be awesome except I opted to use Peewee (which we use at work in a few places, so it helps me learn it better) rather than SQLAlchemy. It also looks like you can do full text search quite easily if you were using SQLite but alas, I'm using MySQL on the backend.
So it looks like the next step is to write something that uses Whoosh for searching, but also integrates with Peewee (in a way that Flask-WhooshAlchemy would). I might look into writing something quick-n-dirty from scratch, or I might poke at Flask-WhooshAlchemy and see if there might be a future Flask-WhooshPeewee... you never know!
If someone on the interwebs has figured this out already though, I would be really keen on hearing what you have to say!
Another issue that currently bothers me a little bit is the UWSGI integration. Because I'm using mod_proxy_uwsgi and running this site as a UWSGI application, I have a systemd unit file to run it, which looks like this:
[Unit] Description=annvix.com flask uwsgi server [Service] Type=forking WorkingDirectory=/mysite/flask ExecStart=/usr/bin/bash -c 'cd /mysite/flask; source flask/bin/activate; /mysite/flask/flask/bin/uwsgi --ini /mysite/flask/annvix.ini' RuntimeDirectory=/mysite/flask Restart=always [Install] WantedBy=multi-user.target
But whenever I run
systemctl start annvix-flask, it sits for a long time before releasing to the console and the systemctl status show it as "activating":
# systemctl status annvix-flask ? annvix-flask.service - annvix.com flask uwsgi server Loaded: loaded (/etc/systemd/system/annvix-flask.service; disabled; vendor preset: disabled) Active: activating (start) since Fri 2016-08-05 17:01:55 MDT; 13s ago Control: 31128 (bash) CGroup: /system.slice/annvix-flask.service ??31128 /usr/bin/bash -c cd /mysite/flask; source flask/bin/activate; /mysite/flask/flask/bin/uwsgi --ini /mysite/flask/annvix.ini ??31133 /mysite/flask/flask/bin/uwsgi --ini /mysite/flask/annvix.ini ??31141 /mysite/flask/flask/bin/uwsgi --ini /mysite/flask/annvix.ini Aug 05 17:01:55 vps.annvix.com bash: [uWSGI] getting INI configuration from /mysite/flask/annvix.ini
Nothing that I've read explains why this might be the case. It works, the site is obviously running, but systemd thinks it's still activating and when it finally releases it's saying it has timed out. This is a cheap plea to smart folks that may have the answer (although if I do figure out why it's doing this, I'll be sure to use the new commenting feature to share the answer).