#!/bin/bash

echo "Start Running projects...";

cd ~ && \
sudo mongod --fork --logpath /var/log/mongod.log --dbpath ~/monterossa/db/ --auth && \
redis-server --daemonize yes && \
cd ~/monterossa/iarchiv-server && \
sudo pm2 start --name server sudo -- gulp release && \
cd ~/monterossa/iarchiv-client && \
sudo gulp release && \
cd ~/monterossa/iarchiv-pdf-worker && \
sudo pm2 start --name pdf-worker sudo -- node ~/monterossa/iarchiv-pdf-worker/index.js release && \
cd ~/monterossa/iarchiv-unified-storage && \
sudo pm2 start --name u-storage sudo -- gulp release --fs && \

echo "Running....";
