First off, let's prep your Raspberry Pi. The Johnson County Library MakerSpace has a comprehensive guide on how to do that: follow the instructions, then come back here.
sudo apt-get install nginx mysql-server sudo apt-get install python python-pip python-dev build-essential git virtualenv virtualenvwrappercurl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install nodejs npm
git clone https://github.com/nprapps/lunchbox.git
mkvirtualenv lunchboxcd lunchboxpip install -r requirements.txtnpm installfab app to generate a temporary version of Lunchbox for review.
From your Rasperry Pi, you can use an Web browser to connect to the local server at 127.0.0.1:8000 to check Lunchbox. If everything looks like it's working, you can move on to personalizing Lunchbox for your org.
It's important to personalize Lunchbox before building it and hosting it on your server: settings are spread over several configuration files in the final installation, so doing it now will save you a lot of time. The configuration instructions for logos, URLS and contact information on NPR's repository will walk you through everything you need to do!
After customizing Lunchbox, fill in the server information for the destination server in app_config.py. We used the following settings:
FILE_SERVER_USER is the same as our pi user - FILE_SERVER_USER = 'pi'FILE_SERVER = '127.0.0.1'FILE_SERVER_PATH = '~/lunchbox-pi'
If everything looks fine, you're ready for the final render and deployment.
app_config.py file then turn off your virtual environment - deactivatecd /home/pimkdir lunchbox-piworkon lunchboxcd lunchboxfab fileserver master deploy127.0.0.1 and type in the password for your Pi user accountdeactivatelunchbox-test in your pi home folder if you haven't changed the PROJECT_SLUG name in app_config.py - cd /home/pi/lunchbox-pi/lunchbox-test/nginx web server's hosting folder to use your customized Lunchbox - sudo cp -a /home/pi/lunchbox-pi/lunchbox-test/. /var/www/html/
You can visit your rendered Lunchbox installation from a browser on your Raspberry Pi at http://127.0.0.1/index.html.