Lightweight blog app used on my site, ianhaddock.com.
- Python
- Flask
- sqlite3
- Markdown
There is a Dockerfile available:
# pull the latest
$ git pull https://github.com/ianhaddock/blog.git
# build the image
$ docker image build ./ -t blog-app
# create an instance volume
$ mkdir ./instance
# run the image
$ docker run --name blog-app -v "instance:/blog/instance" -p8080:5000 -d blog-app
Or run it directly:
# create a virtual environment
$ python -m venv venv
# enable virtual environment
$ . venv/bin/activate
# pull the latest
$ git pull https://github.com/ianhaddock/blog.git
# install wsgi (e.g. waitress) and requirements
$ pip install waitress -r requirements.txt
# setup
$ flask --app app init-db
# start
$ waitress-serve --port=8080 --call app:create_app
Started with a tutorial on Flask and decided to continue.