From 9d6a2a326123f1069c8465a8fb70c34c77bd5c8f Mon Sep 17 00:00:00 2001 From: brucetus <31704711+brucetus@users.noreply.github.com> Date: Sun, 22 Oct 2017 17:22:20 -0700 Subject: [PATCH] Update raspberrypi.md --- docs/raspberrypi.md | 69 ++++++++++++++++++++++++++++++--------------- 1 file changed, 46 insertions(+), 23 deletions(-) diff --git a/docs/raspberrypi.md b/docs/raspberrypi.md index 7a3856b628..1998167d9e 100644 --- a/docs/raspberrypi.md +++ b/docs/raspberrypi.md @@ -1,34 +1,57 @@ -(I'm running it on a Raspberry Pi 3 with Raspbian Stretch) +You can run zenbot on a Raspberry Pi and the default Raspbian OS, but I don't recommend it because mongo has problems with ARM systems as well as 32-bit OSes since it limits the database to 2GB. -**1. Install nodejs.** -http://thisdavej.com/beginners-guide-to-installing-node-js-on-a-raspberry-pi/ +**1. Make sure packages are updated** -**2. Install docker and docker-compose.** -Docker: -https://blog.alexellis.io/getting-started-with-docker-on-raspberry-pi/ -Docker-compose instructions at the end of this page: -https://pixelchrome.org/blog/quickstart-guide-how-to-install-docker-a-raspberry-pi/ +``` +sudo apt update +sudo apt upgrade +``` + +**2. Install docker and docker-compose** + +Install docker + +`curl -sSL https://get.docker.com | sh` + +Autostart on startup: + +`sudo systemctl enable docker` + +Give user permissions: + +`sudo usermod -aG docker ` + +Reboot, or `sudo systemctl start docker` + +Install docker-compose: + +``` +apt-get install python-pip +pip install docker-compose +``` + +**3. Install this or another mongodb docker image made for the rapsberry pi** -**3. Install this or another mongodb dockerfile made for the rapsberry pi.** https://hub.docker.com/r/nonoroazoro/rpi-mongo/ -**4.Rename the mongodb dockerfile to "mongo"** so that the conf.js from zenbot works with it. -In my case: -`docker tag nonoroazoro/rpi-mongo:latest mongo:latest` +`docker pull nonoroazoro/rpi-mongo` + +**4.Rename the mongodb dockerfile to "mongo"** -**5.Run the mongo dockerfile.** -`docker run mongo` -(You can control-c or command-c to close the dialogue after it stays at "waiting for connections on port 27017") -`docker ps` -to make sure mongo is running +If you use the above image: -**6. Run zenbot.** -`cd zenbot` -`docker-compose build` -`docker-compose up -d` +`docker tag nonoroazoro/rpi-mongo mongo` + +**6. Run zenbot** + +``` +cd zenbot +docker-compose build +docker-compose up -d +``` Commands are the same -`docker run --rm --link zenbot_mongodb_1:mongodb -it zenbot_server ./zenbot.sh [command]` + +`docker run --rm --link zenbot_mongodb_1:mongodb -it zenbot_server [command]` -There ya go