diff --git a/docker/containers/tactical-frontend/dockerfile b/docker/containers/tactical-frontend/dockerfile index 5a525cbe..7b343823 100644 --- a/docker/containers/tactical-frontend/dockerfile +++ b/docker/containers/tactical-frontend/dockerfile @@ -3,6 +3,7 @@ FROM node:12-alpine AS builder WORKDIR /home/node/app COPY ./web/package.json . +RUN npm install -g npm RUN npm install COPY ./web . diff --git a/install.sh b/install.sh index 3e368166..a6d90e68 100644 --- a/install.sh +++ b/install.sh @@ -216,6 +216,7 @@ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - sudo apt update sudo apt install -y gcc g++ make sudo apt install -y nodejs +sudo npm install -g npm print_green 'Installing MongoDB' @@ -251,6 +252,10 @@ echo "$postgresql_repo" | sudo tee /etc/apt/sources.list.d/pgdg.list wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - sudo apt update sudo apt install -y postgresql-13 +sleep 2 +sudo systemctl enable postgresql +sudo systemctl restart postgresql +sleep 5 print_green 'Creating database for the rmm' diff --git a/restore.sh b/restore.sh index d757e63e..5d336c86 100755 --- a/restore.sh +++ b/restore.sh @@ -133,6 +133,7 @@ curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - sudo apt update sudo apt install -y gcc g++ make sudo apt install -y nodejs +sudo npm install -g npm print_green 'Restoring Nginx' @@ -205,9 +206,8 @@ wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt- sudo apt update sudo apt install -y postgresql-13 sleep 2 - - - +sudo systemctl enable postgresql +sudo systemctl restart postgresql print_green 'Restoring MongoDB' diff --git a/update.sh b/update.sh index ac8d4c62..43f3a15c 100644 --- a/update.sh +++ b/update.sh @@ -172,6 +172,10 @@ printf >&2 "${GREEN}Stopping ${i} service...${NC}\n" sudo systemctl stop ${i} done +printf >&2 "${GREEN}Restarting postgresql database${NC}\n" +sudo systemctl restart postgresql +sleep 5 + rm -f /rmm/api/tacticalrmm/app.ini numprocs=$(nproc) @@ -255,6 +259,8 @@ if ! [[ $HAS_NATS220 ]]; then rm -rf ${nats_tmp} fi +sudo npm install -g npm + cd /rmm git config user.email "admin@example.com" git config user.name "Bob"