Skip to content

Latest commit

 

History

History
40 lines (30 loc) · 1.3 KB

README-SETUP.md

File metadata and controls

40 lines (30 loc) · 1.3 KB

Checkout the api code

Set things up

  • cd code/CubeServer
  • ./generate_certs.sh
  • vi .env
    • set MONGODB_HOSTNAME
    • set MONGODB_PASSWORD
    • set MONGODB_DRIVER=mongodb # used for local mongodb
    • set MONGODB_OPTIONS=authSource=admin # used for local mongodb

Have the raspberry pi restart nightly

  • sudo crontab -e
  • 15 6 * * * reboot

Install a version of MongoDB that works on the Pi

To just run the api server

Start so that it will restart on device restart

  • docker compose --profile api up -d

Create Crontab

  • crontab -e
  • */5 * * * * cd code/CubeServer && bash deploy.sh api 2> /home/admin/error.txt`

To run a full system

Start so that it will restart on device restart

  • docker compose --profile full up -d

Create Crontab

  • crontab -e
  • */5 * * * * cd code/CubeServer && bash deploy.sh full 2> /home/admin/error.txt`