Search results

Matches found for tag 'Docker': 6

13 November 2019 by Peter
post main image
While writing an application on my Docker platform I hit an unexpected problem, yes, another one ... This was the first time that I had to show the time on a page of a website running on Docker and it appeared that the time was UTC instead of local time. In the code I was just using the normal Python calls to get the time: import datetime ... now = datetime.datetime.now() hour = now.hour ...
Read more
18 October 2019 Updated 18 October 2019 by Peter
post main image
I run a server with ISPConfig with some 50 sites. The sites are static or PHP. I am developing Python Flask applications now and also want to run them on the ISPConfig server. You can create virtual environments on the ISPConfig server and run your application from here. But some time ago I have chosen to use Docker for development, staging and production. It takes time to set this up ...
Read more
4 July 2019 Updated 29 August 2019 by Peter
post main image
In the past I wrote a captcha in PHP to limit email newsletter sign ups, worked fine, in fact it is still in use today. You cannot really block spam registrations. There are registration robots but there are also people being paid a few bucks to flood your website with fake or troll accounts. That is the reality and we have to face it. And now there is also deeplearning that can be used to break our ...
Read more
28 June 2019 Updated 31 August 2019 by Peter
post main image
In the endless number of problems you encounter, and solve, when starting to use new technology I was facing a new one: how to send email from my Python Docker app using the ISPConfig host MTA (Mail transfer Agent). I found there are two ways to do this: Send mail from our container to port 25 of the host where the MTA is listening on Write the mail file to a directory on the host and use a script ...
Read more
10 March 2019 Updated 30 August 2019 by Peter
post main image
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 ...
Read more
13 February 2019 Updated 31 August 2019 by Peter
post main image
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 ...
Read more