Web accessible thermometer using python3, CGI and LAMP stack
334
This image implement a web accessible thermometer using the LAMP stack and a simple Python3 CGI program. This image leverages the fastberry apachaphpmysql image which gives us the lamp stack.
Check out http://fastberry.net for details on the project.
Open a terminal and start the container with:
docker run -it -p 80:80 fastberry/webthermo
The container will start the apache and MySQL services and enter a shell. You should see this:
pi@pishare:~/docker/fastberryApachePHPMySQL $ docker run --name apachephpmysql -it -p 80:80 fastberry/apachephpmysql:latest
Starting services
Starting MYSQL server...
Waiting for MySQL server to start and accept connections...........
Starting Apache
Services should be running
Check for apache
4 S root 411 1 0 80 0 - 456 wait 15:21 ? 00:00:00 /bin/sh /usr/sbin/apache2ctl -D FOREGROUND
0 S root 413 11 0 80 0 - 1070 pipe_w 15:21 ? 00:00:00 grep apache
Check for MySQL
4 S root 13 1 0 80 0 - 456 wait 15:21 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe
4 S mysql 364 13 8 80 0 - 81543 - 15:21 ? 00:00:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr .....
0 S root 417 11 0 80 0 - 1070 pipe_w 15:21 ? 00:00:00 grep mysql
MySQL Version:
mysql Ver 14.14 Distrib 5.5.54, for debian-linux-gnu (armv7l) using readline 6.3
+------------------+--------------+
| user | host |
+------------------+--------------+
| root | 127.0.0.1 |
| root | 7d8b079f8b95 |
| root | ::1 |
| debian-sys-maint | localhost |
| fastberry | localhost |
| root | localhost |
+------------------+--------------+
root@c3ddf0b31bf7:/#
The shell will remain open for interacting with the container until the container is killed or you exit the shell.
Connect to the Raspberry PI using your favorite web browser. If all went well you should see a web page that displays a headline and temperature readings - provided you have temperature sensors connected to your Raspberry PI.
Content type
Image
Digest
Size
135.9 MB
Last updated
over 9 years ago
docker pull fastberry/webthermo