10 March 2019 Updated 30 August 2019 by Peter
When using docker we want the size of the docker image to be minimal. Why? Many reasons. Memory footprint is one especially when running many Python Flask websites on an ISPConfig3 server. Fortunately, from docker 17.05 we can use multistage builds. Using this we reduce our image size from 376MB to 211MB! Below are two images we can use: > docker images python 3.6-alpine 1837080c5e87 5 ...
9 March 2019 Updated 28 August 2019 by Peter
By default Alembic does not change the length of string fields, I noticed this after changing a string field from: description = Column(String(150), server_default='') to: description = Column(String(250), server_default='') No changes were made. It appears that column type change detection is off by default, so you can test it first, and can be turned on by adding 'compare_type=True' to the context. ...
13 February 2019 Updated 31 August 2019 by Peter
This is a post showing how to run a Flask app on ISPConfig3. Why? I have a VPS on the internet running Debian and ISPConfig3. It is running static sites and PHP sites. But now I also want to run my Flask python apps here. This way I can use the domain management I am used to and do not need an extra server for Python apps. This solution uses Docker to run the Flask app, printing 'Hello world', and ...
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. Read more
- Two Flask apps, frontend and admin, on one domain using DispatcherMiddleware
- Flask with multiple forms on a page posted using AJAX and returning a rendered form result
- Adding url_for() links to Jinja templates of a Flask multilanguage website
- SLQAlchemy dynamic query building and filtering including soft deletes
- Docker containers suddenly using 192.168.0.0/16 instead of 172.17.0.0/16: services lost
- OWASP Zed Attack Proxy (ZAP) security testing