- One Hardisk (500Mb or 1Tb)
- Raspberry Pi 3 or any linux machine capable or running Docker 17.05 - CE
- Basic I/O's
Mount the hardisk on raspberry pi at /media/pi/Dragon location. We need to setup a overlay network on which we will connect both the containers on
-
HomeBox Container : Clone the code into local repository and go to backend and do "docker build -t homebox:latest ." Wola we have homebox container image. Verify it using "docker images".
-
Nginx Container: "docker pull tobi312/rpi-nginx"
- Create Net1 Overlay Network using following command:
docker network create -d overlay --subnet=5.5.0.0/16 --gateway=5.5.5.254 --ip-range=5.5.5.0/24 Net1
- Run Nginx Container using following command:
docker service create --name Nginx-1 --network Net1 --mount type=bind,source=/home/pi/homebox/default,destination=/etc/nginx/sites-available/default --mount type=bind,source=/home/pi/homebox/html,destination=/var/www/html --mount type=bind,source=/home/pi/homebox/ssl,destination=/etc/nginx/conf.d --mount type=bind,source=/home/pi/homebox/hosts,destination=/etc/hosts --publish 443:443/tcp tobi312/rpi-nginx
- Run HboxServer Container using following command:
docker service create --name HBoxServer --network Net1 --mount type=bind,source=/media/pi/Dragon,destination=/media/pi/Dragon hboxserver:0.1
Browse to raspberry pi's IP using https protocol and wola you are done