angle-up arrow-clockwise arrow-counterclockwise arrow-down-up arrow-left at calendar card-list chat check envelope folder house info-circle pencil people person person-plus phone plus question-circle search tag trash x

About

11 August 2019 Updated 30 May 2020

This website is a multi-language CMS / Blog I build with Python, the framework Flask and SQLAlchemy. It is deployed on my ISPConfig3 (Nginx + Mariadb) server using Docker which is also used for development. The website features user registration, a lot of administrator functions, privacy and security, so this is not a small project. Some 'highlights':

Tech

  • Python 3 (3.7)
  • Flask
  • SQLAlchemy
  • Mariadb
  • Docker, docker-compose
  • Bootstrap4
  • Fontawesome
  • Tinymce
  • ISPConfig3

Deployment

Steps are development, staging and production, all using docker and docker-compose. Development uses the Flask development server, staging and production use the Gunicorn server. Finally, ISPConfig3 is used to control the domain, database and SMTP email, Nignx is configured as a reverse proxy.

Privacy

Do not expect to find here solutions like using CDNs, Google Analytics, Facebook plugins, etc. Privacy is one of the most important things in life. While impossible to prevent tracking us and collecting our valuable private data, I believe we all must make an effort to minimize this.

Security

Security always is a work in progress. It starts with design for security which also means that you must put a lot of effort in logging things. There are great tools  like OWASP ZAP and online services like securityheaders.com and detectify.com that can help you identify vulnerabilities. 

Multilanguage

While the text of this website is written in English, it supports multiple languages using the Flask-Babel extension. The other language texts are machine translated at the moment using the DeepL API and sometimes are far from perfect, but you can always edit the messages.po files.

Machine learning

Artificial intelligence (AI) is invading our lives in many ways. Python is the language used with machine learning and deep learning. Personally I do not like these developments because no one can be held liable for the decisions taken. But AI can also help us in good ways like recommending other news items at the end of a news item. 

More: Kivy

Was also looking for a Python GUI. Started using tkinter but soon found this had many limitations for my purpose. Bumped into Kivy and went building a first app with it. You can also deploy a Kivy app on Android, but do we want to support the Android ecosystem? Will also be posting about my Kivy project.

Whats next?

The next months I will try to document some of the things I did to make this work, like using SQLAlchemy without Flask-SQLAlchemy, avoiding poorly maintained Flask extensions, migrations using Alembic, minimizing the size of a Docker image, docker-compose configurations. 

Thank you, Peter

Leave a comment

Comment anonymously or log in to comment.

Comments

Leave a reply

Reply anonymously or log in to reply.