start 666 Bytes
#!/bin/bash

FOLDER="logs"
FILE=$(date +%Y%m%d%H%M.log)
LOGFILE=$FOLDER"/"$FILE
mkdir -p $FOLDER


echo "GarganText: Starting project..."
echo "GarganText: First, compiling code..."
bin/install
echo "GarganText: code compiled [OK]"
echo "GarganText: docker for postgresql database..."
cd devops/docker
docker compose up -d
echo "GarganText: docker for postgresql database [OK]"
cd ../../
echo "GarganText: gargantext-server with Nix and Cabal..."
nix-shell --run "cabal run gargantext-server -- --ini gargantext.ini --run Prod +RTS > $LOGFILE 2>&1 & tail -F $LOGFILE"
echo "GarganText: gargantext-server with Nix and Cabal [OK]"
echo "GarganText: project stopped."