Jeedom 2.0.1 image for Raspberry Pi (MySQL not included, ready for OpenZWave plugin installation)
1.5K
Jeedom is an Open Source home automation system. Detailed information: https://www.jeedom.com
In this image OpenZwave plugin is ready to be installed but IS NOT installed (see https://hub.docker.com/r/sbeuzit/rpi-jeedom-oz for an image with OpenZWave already installed).
Github repository: https://github.com/sbeuzit/docker-rpi-jeedom
** Using docker-compose (2016/03/29) **
Easiest way is to get https://github.com/sbeuzit/docker-rpi-jeedom/blob/master/jeedom/docker-compose.yml and launch
docker-compose up
Then go to http:/// and start the installation. MySQL hostname is jeedom-mysql and password is 'password' (can be changed in docker-compose.yml file).
Remark 1: If no ZWave USB key is present (such as the UZB1) then remove the devices section from the docker-compose.yml filedevices section from the docker-compose.yml file.
Remark 2: To use tmpfs filesystem for log files and prevent SD card wearout, you can launch the jeedom container with specific parameter (will be added in docker-compose.yml once tmpfs will be supported - currently it is only available in 1.7 RC1 version):
sudo docker stop jeedom
sudo docker rm jeedom
sudo docker run -d --link jeedom-mysql:mysql --device=/dev/ttyACM0:/dev/ttyACM0 --name jeedom --mac-address="b8:27:eb:3c:08:33" -p 80:80 -p 8083:8083 -p 443:443 --tmpfs /tmp:rw,size=32M --tmpfs /var/log:rw,size=32M --tmpfs /var/www/html/log:rw,size=32M sbeuzit/rpi-jeedom```
**Remark 3:** To launch a PHPMyAdmin container connected to Jeedom MySQL database:
docker run --net=pirate_default -d --restart=always -e PMA_USERNAME=root -e PMA_PASSWORD=<jeedom_db_password> --link jeedom-mysql:mysql --name phpmyadmin -p 8080:80 bkjeholt/phpmyadmin-rpi:latest
Then go to http://<JeedomIP>:8080
**Details to run it manually**
3 images are needed: https://hub.docker.com/r/sbeuzit/rpi-jeedom, https://hub.docker.com/r/sbeuzit/rpi-jeedom-data and https://hub.docker.com/r/hypriot/rpi-mysql.
**Deployment**
+ Data volume creation (to persist MySQL data):
```sudo docker pull sbeuzit/rpi-jeedom-data```
```sudo docker run --name jeedom-data sbeuzit/rpi-jeedom-data```
(container immediately exits but volume container is created)
+ MySQL container:
```sudo docker pull hypriot/rpi-mysql```
```sudo docker run --name jeedom-mysql -e MYSQL_ROOT_PASSWORD=my_mysql_password --volumes-from jeedom-data -d hypriot/rpi-mysql```
+ Jeedom container:
```sudo docker run -d --link jeedom-mysql:mysql --device=/dev/ttyACM0:/dev/ttyACM0 --name jeedom --mac-address="xx:xx:xx:xx:xx:xx" -p 80:80 -p 8083:8083 -p 443:443 sbeuzit/rpi-jeedom
--link jeedom-mysql:mysql: To connect this container to jeedom-mysql one. Doing so will make the MySQL server available to Jeedom.
--device=/dev/ttyACM0:/dev/ttyACM0: To provide access to /dev/ttyACM0 (ZWAVE.ME ZME_UZB1 device name) to Docker container.
--mac-address="xx:xx:xx:xx:xx:xx": To always use the same MAC address (I use the one from my Raspberry). Mandatory when buying plugins from the Jeedom market as licenses are associated to this MAC address.
-p 80:80: Map container's HTTP port to host HTTP port.
-p 443:443: Map container's HTTPS port to host HTTPS port.
-p 8083:8083: Map container's OpenZWave port to host port.
Jeedom installation
OpenZWave installation
For information, to make OpenZWave installation successful, the following lines have been added to the Dockerfile:
RUN mkdir -p /var/www/html/plugins/openzwave/data && chown -R www-data.www-data /var/www/html/plugins/openzwave/data
- Docker IP added to authorized list. If not done intrusion detection reported.
RUN sed -i 's/,127.0.0.1/,127.0.0.1,172.17../' /var/www/html/core/config/default.config.ini
Dockerfiles
-------------
*rpi-jeedom-data*
> FROM hypriot/rpi-busybox-httpd
> MAINTAINER [email protected]
> VOLUME /var/lib/mysql
> CMD ["true"]
*rpi-jeedom*
> FROM armhf/debian
> MAINTAINER [email protected]
>
> RUN apt-get update
> RUN apt-get -y dist-upgrade
> RUN apt-get -y install dialog apt-utils libterm-readline-perl-perl supervisor \
mysql-client \
nginx-common nginx-full ntp ca-certificates unzip curl sudo \
php5-cli php5-common php5-curl php5-fpm php5-json php5-mysql php5-gd \
wget cron
> RUN apt-get autoremove
> RUN mkdir -p /var/www/html/log && \
> sed -i 's/max_execution_time = 30/max_execution_time = 600/g' /etc/php5/fpm/php.ini && \
> sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 1G/g' /etc/php5/fpm/php.ini && \
> sed -i 's/post_max_size = 8M/post_max_size = 1G/g' /etc/php5/fpm/php.ini && \
> sed -i 's/expose_php = On/expose_php = Off/g' /etc/php5/fpm/php.ini && \
> sed -i 's/pm.max_children = 5/pm.max_children = 20/g' /etc/php5/fpm/pool.d/www.conf && \
> rm /etc/nginx/sites-available/default && \
> rm /etc/nginx/sites-enabled/default
> COPY nginx_default /etc/nginx/sites-available/default
> RUN ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
> RUN echo "* * * * * su --shell=/bin/bash - www-data -c '/usr/bin/php /var/www/html/core/php/jeeCron.php' >> /dev/null" | crontab -
> RUN echo "www-data ALL=(ALL) NOPASSWD: ALL" | (EDITOR="tee -a" visudo)
> RUN mkdir -p /var/www/html && \
> rm -rf /root/core-* && \
> wget https://github.com/jeedom/core/archive/stable.zip -O /tmp/jeedom.zip && \
> unzip -q /tmp/jeedom.zip -d /root/ && \
> cp -R /root/core-*/* /var/www/html/ && \
> cp -R /root/core-*/.htaccess /var/www/html/
> RUN mkdir -p /var/www/html/plugins/openzwave/data && \
> chown -R www-data.www-data /var/www/html/plugins/openzwave/data
> RUN sed -i 's/,127.0.0.1/,127.0.0.1,172.17.*.*/' /var/www/html/core/config/default.config.ini
> RUN mkdir /etc/nginx/ssl
> RUN openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt -subj "/C=FR/ST=France/L=Nice/O=Home/OU=Home/CN=jeedom.com"
> RUN echo "daemon off;" >> /etc/nginx/nginx.conf
> COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
> CMD ["/usr/bin/supervisord"]
Content type
Image
Digest
Size
188.3 MB
Last updated
over 10 years ago
docker pull sbeuzit/rpi-jeedom