Skip to content
Snippets Groups Projects
Commit 45c32acf authored by ThePurpleOne's avatar ThePurpleOne
Browse files

Added docs

parent 6d2855ae
Branches fourier_coeff
No related tags found
1 merge request!3added server into master
src/server/installer.png

37.1 KiB

# This documents how to run the server on a Raspberry PI (3B) # Server documentation
For simple use and installation, the server services are empacted into a docker-compose. There will be containers for:
- mosquitto (MQTT broker)
- Nodered (No code web based programming tool)
> The first 2 steps can be skipped if you're using an other server and dont need to install raspbian and docker. (You'll only need docker, docker-compose )
## Install raspbian on the PI ## Install raspbian on the PI
We need to install a linux on the PI. We need to install a linux on the PI.
Download the Raspberry PI Imager on [https://www.raspberrypi.com/software/](https://www.raspberrypi.com/software/) Download the Raspberry PI Imager on [https://www.raspberrypi.com/software/](https://www.raspberrypi.com/software/)
or on Ubuntu with :
- Select the base raspbian image or similar (needs to be debian based for the exact commands to work)
- Select your SD card
- Configure Wifi and ssh for simpler use (Click on the bot right gear)
- Write
![installer.png](installer.png)
## Install Docker and docker compose on the PI
Source : [https://docs.docker.com/engine/install/raspbian/](https://docs.docker.com/engine/install/raspbian/)
```bash ```bash
sudo apt-install rpi-imager sudo apt-get update
``` sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/raspbian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
https://docs.docker.com/engine/install/raspbian/ echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/raspbian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl enable docker
```
Test the installation :
```bash
sudo docker run hello-world
```
## Install and run ## Install and run
Install docker-compose
Go into the server directory, you should have this file structure: Go into the server directory, you should have this file structure:
```bash ```bash
...@@ -54,19 +89,4 @@ docker-compose down ...@@ -54,19 +89,4 @@ docker-compose down
Get into the container's shell: Get into the container's shell:
```bash ```bash
docker exec -it server bash docker exec -it server bash
```
https://nodered.org/docs/user-guide/runtime/adding-nodes
```
package.json # Additonnal packages
flows.json # the normal place Node-RED store your flows
flows_cred.json # credentials your flows may need
settings.js # your settings file
```
Add a npm package
Install image processing tool:
```bash
npm install node-red-contrib-image-tools
``` ```
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment