mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
22 lines
585 B
Bash
22 lines
585 B
Bash
|
|
#! /usr/bin/env bash
|
||
|
|
# This script will rebuild and install dependencies of the API and App.
|
||
|
|
|
||
|
|
set -x
|
||
|
|
set -e
|
||
|
|
|
||
|
|
# Install any App dependencies.
|
||
|
|
cd /opt/wrolpi/app || exit 1
|
||
|
|
npm install || npm install || npm install || npm install # try install multiple times :(
|
||
|
|
# Build app in the background.
|
||
|
|
npm run build &
|
||
|
|
|
||
|
|
# Install python requirements in background job.
|
||
|
|
/opt/wrolpi/venv/bin/pip3 install -r /opt/wrolpi/requirements.txt &
|
||
|
|
|
||
|
|
wait $(jobs -p)
|
||
|
|
|
||
|
|
# Upgrade the WROLPi database.
|
||
|
|
(cd /opt/wrolpi && /opt/wrolpi/venv/bin/python3 /opt/wrolpi/main.py db upgrade)
|
||
|
|
|
||
|
|
systemctl start wrolpi.target
|