File tree 6 files changed +43
-3
lines changed
6 files changed +43
-3
lines changed Original file line number Diff line number Diff line change
1
+ FROM python:3
2
+
3
+ WORKDIR /usr/src/app
4
+
5
+ COPY requirements.txt ./
6
+
7
+ RUN pip install --no-cache-dir -r requirements.txt
8
+
9
+ CMD [ "python" , "./app.py" ]
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Directoryfix for python
4
+
5
+ if [ ! -d ./volumes/python/app ]; then
6
+ sudo mkdir -p ./volumes/python/app
7
+ sudo chown -R pi:pi ./volumes/python
8
+ echo ' print("hello world")' > ./volumes/python/app/app.py
9
+
10
+ fi
Original file line number Diff line number Diff line change
1
+ python :
2
+ container_name : python
3
+ build : ./services/python/.
4
+ restart : unless-stopped
5
+ network_mode : host
6
+ volumes :
7
+ - ./volumes/python/app:/usr/src/app
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ IOTstack is a builder for docker-compose to easily make and maintain IoT stacks
6
6
7
7
The bulk of the README has moved to the Wiki. Please check it out [ here] ( https://github.com/gcgarner/IOTstack/wiki )
8
8
9
+ * 2019-12-19 Added python container, tweaked update script
9
10
* 2019-12-12 modified zigbee2mqtt template file
10
11
* 2019-12-12 Added Function to add custom containers to the stack
11
12
* 2019-12-12 PR cmskedgell: Added Homebridge
@@ -26,7 +27,6 @@ The bulk of the README has moved to the Wiki. Please check it out [here](https:/
26
27
* Node-RED: serial port. New template adds privileged which allows acces to serial devices
27
28
* EspurinoHub: is available for testing see wiki entry
28
29
29
-
30
30
***
31
31
32
32
## Highlighted topics
@@ -42,7 +42,6 @@ The bulk of the README has moved to the Wiki. Please check it out [here](https:/
42
42
* reverse proxy is now next on the list, I cant keep up with the ports
43
43
* Detection of arhcitecture for seperate stack options for amd64, armhf, i386
44
44
* autocleanup of backups on cloud
45
- * python container
46
45
* Gitea (in testing branch)
47
46
* OwnCloud
48
47
Original file line number Diff line number Diff line change @@ -27,11 +27,12 @@ declare -A cont_array=(
27
27
[nginx]=" NGINX by linuxserver"
28
28
[diyhue]=" diyHue"
29
29
[homebridge]=" Homebridge"
30
+ [python]=" Python 3"
30
31
31
32
)
32
33
declare -a armhf_keys=(" portainer" " nodered" " influxdb" " grafana" " mosquitto" " telegraf" " mariadb" " postgres"
33
34
" adminer" " openhab" " zigbee2mqtt" " pihole" " plex" " tasmoadmin" " rtl_433" " espruinohub"
34
- " motioneye" " webthings_gateway" " blynk_server" " nextcloud" " diyhue" " homebridge" )
35
+ " motioneye" " webthings_gateway" " blynk_server" " nextcloud" " diyhue" " homebridge" " python " )
35
36
36
37
sys_arch=$( uname -m)
37
38
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ echo " Stopping containers"
4
+ docker-compose down
5
+
6
+ echo " Downloading latest images from docker hub ... this can take a long time"
1
7
docker-compose pull
8
+
9
+ echo " Building images if needed"
10
+ docker-compose build
11
+
12
+ echo " Starting stack up again"
13
+ docker-compose up -d
14
+
15
+ echo " Consider running prune-images to free up space"
You can’t perform that action at this time.
0 commit comments