Skip to content

Commit c2bbaea

Browse files
committed
Udated README, changed docker backup to check if influxdb is running in stead if the folder exists, fixed rpieasy shebang
1 parent ef8711e commit c2bbaea

File tree

3 files changed

+34
-21
lines changed

3 files changed

+34
-21
lines changed

.native/rpieasy.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#! /bin/bash
1+
#!/bin/bash
22

33
echo "Updating and installing requirements"
44
sudo apt-get update && sudo apt-get install -y python3-pip screen alsa-utils wireless-tools wpasupplicant zip unzip git

README.md

+30-18
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
# Announcements
1+
# IOTStack
2+
3+
IOTstack is a builder for docker-compose to easily make and maintain IoT stacks on the Raspberry Pi
4+
5+
## Announcements
26

37
The bulk of the README has moved to the Wiki. Please check it out [here](https://github.com/gcgarner/IOTstack/wiki)
48

9+
* 2019-11-28 PR @stfnhmplr fixed incorrect shegang on MariaDB terminal.sh
510
* 2019-11-28 Added native install for RPIEasy
611
* 2019-11-27 Additions: NextCloud, MariaDB, MotionEye, Mozilla Webthings, blynk-server (fixed issue with selection.txt)
712
* 2019-11-22 BUGFIX selection.txt failed on fresh install, added pushd IOTstack to menu to ensure correct path
@@ -27,7 +32,7 @@ The bulk of the README has moved to the Wiki. Please check it out [here](https:/
2732

2833
***
2934

30-
# Coming soon
35+
## Coming soon
3136

3237
* Detection of arhcitecture for seperate stack options for amd64, armhf, i386
3338
* autocleanup of backups on cloud
@@ -38,7 +43,7 @@ The bulk of the README has moved to the Wiki. Please check it out [here](https:/
3843

3944
***
4045

41-
# IOTstack
46+
## About
4247

4348
Docker stack for getting started on IoT on the Raspberry Pi.
4449

@@ -60,6 +65,9 @@ This Docker stack consists of:
6065
* Telegraf (wiki coming soon)
6166
* RTL_433
6267
* EspruinoHub (testing)
68+
* MotionEye
69+
* MariaDB
70+
* Plex
6371

6472
In addition, there is a write-up and some scripts to get a dynamic DNS via duckdns and VPN up and running.
6573

@@ -75,29 +83,29 @@ The container will fail if you try to run the docker and native vesions as the s
7583

7684
For those looking for a script that installs native applications check out [Peter Scargill's script](https://tech.scargill.net/the-script/)
7785

78-
# Tested platform
86+
## Tested platform
7987

8088
Raspberry Pi 3B and 4B Raspbian (Buster)
8189

82-
## Older Pi's
90+
### Older Pi's
8391

8492
Docker will not run on a PiZero or A model 1 because of the CPU. It has not been tested on a Model 2. You can still use Peter Scargill's [script](https://tech.scargill.net/the-script/)
8593

8694
## Running under a virtual machine
8795

8896
For those wanting to test out the script in a Virtual Machine before installing on their Pi there are some limitations. The script is designed to work with Debian based distributions. Not all the container have x86_64 images. For example Portainer does not and will give an error when you try and start the stack. Please see the pinned issue [#29](https://github.com/gcgarner/IOTstack/issues/29), there is more info there.
8997

90-
# Feature Requests
98+
## Feature Requests
9199

92100
Please direct all feature requests to [Discord](https://discord.gg/W45tD83)
93101

94-
# Youtube reference
102+
## Youtube reference
95103

96104
This repo was originally inspired by Andreas Spiess's video on using some of these tools. Some containers have been added to extend its functionality.
97105

98106
[YouTube video](https://www.youtube.com/watch?v=JdV4x925au0): This is an alternative approach to the setup. Be sure to watch the video for the instructions. Just note that the network addresses are different, see note below
99107

100-
# Download the project
108+
## Download the project
101109

102110
1.On the lite image you will need to install git first
103111

@@ -119,30 +127,30 @@ Due to some script restraints, this project needs to be stored in ~/IOTstack
119127
cd ~/IOTstack
120128
```
121129

122-
# The Menu
130+
## The Menu
123131

124132
I've added a menu to make things easier. It is good to familiarise yourself with the installation process.
125133
The menu can be used to install docker and build the docker-compose.yml file necessary for starting the stack. It also runs a few common commands. I do recommend you start to learn the docker and docker-compose commands if you plan on using docker in the long run. I've added several helper scripts, have a look inside.
126134

127135
Navigate to the project folder and run `./menu.sh`
128136

129-
## Installing from the menu
137+
### Installing from the menu
130138

131139
Select the first option and follow the prompts
132140

133-
## Build the docker-compose file
141+
### Build the docker-compose file
134142

135143
docker-compose uses the `docker-compose.yml` file to configure all the services. Run through the menu to select the options you want to install.
136144

137-
## Docker commands
145+
### Docker commands
138146

139147
This menu executes shell scripts in the root of the project. It is not necessary to run them from the menu. Open up the shell script files to see what is inside and what they do.
140148

141-
## Miscellaneous commands
149+
### Miscellaneous commands
142150

143151
Some helpful commands have been added like disabling swap.
144152

145-
# Running Docker commands
153+
## Running Docker commands
146154

147155
From this point on make sure you are executing the commands from inside the project folder. Docker-compose commands need to be run from the folder where the docker-compose.yml is located. If you want to move the folder make sure you move the whole project folder.
148156

@@ -164,14 +172,18 @@ The `docker-compose down` command stops the containers then deletes them.
164172

165173
Docker allows you to map folders inside your containers to folders on the disk. This is done with the "volume" key. There are two types of volumes. Modification to the container are reflected in the volume.
166174

167-
# See Wiki for further info
175+
## See Wiki for further info
168176

169177
[Wiki](https://github.com/gcgarner/IOTstack/wiki)
170178

171-
# Add to the project
179+
## Add to the project
172180

173181
Feel free to add your comments on features or images that you think should be added.
174182

175-
# Contributions
183+
## Contributions
184+
185+
If you use some of the tools in the project please consider donating or contributing on their projects. It doesn't have to be monetary, reporting bugs and PRs help improve the projects for everyone.
186+
187+
### Thanks
176188

177-
@mrmx, @oscrx, @brianimmel, @Slyke, @AugustasV, @Paulf007, @affankingkhan, @877dev, @Paraphraser
189+
@mrmx, @oscrx, @brianimmel, @Slyke, @AugustasV, @Paulf007, @affankingkhan, @877dev, @Paraphraser, @stfnhmplr

scripts/docker_backup.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ echo "./docker-compose.yml" >list.txt
99
echo "./services/" >>list.txt
1010
echo "./volumes/" >>list.txt
1111

12-
#if influxdb folder exists then back it up
13-
if [ -d ./volumes/influxdb ]; then
12+
#if influxdb is running
13+
if [ $(docker ps | grep -c influxdb) -gt 0 ]; then
1414
./scripts/backup_influxdb.sh
1515
echo "./backups/influxdb/" >>list.txt
1616
fi
@@ -24,6 +24,7 @@ echo "compressing stack folders"
2424
sudo tar -czf \
2525
./backups/$backupfile \
2626
--exclude=./volumes/influxdb/* \
27+
--exclude=./volumes/nextcloud/* \
2728
-T list.txt
2829

2930
rm list.txt

0 commit comments

Comments
 (0)