Skip to content

Software installation

Boris Fritscher edited this page Mar 3, 2018 · 9 revisions

On computer

You can build the application on your computer from the source code (maven and jdk 1.8+ required)

mvn clean install

Frontend

dev web server on 8081 npm run dev

mock server on 3000 npm run mock

build and deploy to github npm run build npm run deploy

On the raspberry

Install raspbian or any other distribution (no UI needed).

Java

Install java jre 8+

sudo apt-get install oracle-java8-jdk

Mongodb

Install mongodb-server

sudo apt-get install mongodb-server

Nginx

sudo apt-get install nginx
root /var/www/bar-o-matic;
location /api/ {
    proxy_pass http://127.0.0.1:8080/api/;
    proxy_http_version 1.1;
    proxy_set_header Connection "";
    proxy_buffering off;
    proxy_cache off;
}

Frontend interface

origin/frontend-prod /var/www/bar-o-matic

> git fetch && git reset --hard origin/frontend-prod

Backend server

Copy the jar from the target folder. You can use scp or filezilla.

sudo mv *.jar /opt/bar-o-matic.jar
sudo chmod +x /opt/bar-o-matic.jar
sudo rm -Rf /etc/init.d/bar-o-matic
sudo ln -s /opt/bar-o-matic.jar /etc/init.d/bar-o-matic

Start the server using sudo service start bar-o-matic.

You can start automatically the service by running sudo update-rc.d bar-o-matic defaults

Logs file can be read at /var/log/bar-o-matic.log.

The service can take up to 40sec to boot

Work in progress...

Clone this wiki locally