install 1.72 KB
Newer Older
1 2
#!/bin/bash

3

4 5 6 7 8 9 10
if git --version;
then 
  echo "git installed, ok"
else
  sudo apt update && sudo apt install git
fi

Alexandre Delanoë's avatar
Alexandre Delanoë committed
11
if docker --version; 
12 13
then
  echo "Docker installed, ok"
14 15
else
  curl -sSL https://get.docker.com/ | sh
16 17 18
  echo "Docker has been installed"
  echo "Configure your user rights:"
  echo "   sudo usermod -a -G docker $USER"
Alexandre Delanoë's avatar
Alexandre Delanoë committed
19
  echo "   or : adduser $(whoami) docker"
20
fi
21

22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
echo "---------------script docker-----------------------------"

########################################################################
# Docker path conf
if [ -f "/usr/local/bin/docker" ]
then
  echo "docker alias exists already"
else
  DOCKERBIN="/usr/local/bin/docker"
  sudo touch $DOCKERBIN
  sudo chmod o+w $DOCKERBIN
  sudo echo "#!/bin/sh
exec sudo -E /usr/bin/docker \"\$@\"" >> $DOCKERBIN
  sudo chmod gou+x $DOCKERBIN
  sudo chmod o-w $DOCKERBIN
fi
########################################################################
39

40 41
curl -sSL https://get.haskellstack.org/ | sh
stack update
42
stack upgrade
43

44

Alexandre Delanoë's avatar
Alexandre Delanoë committed
45
git clone https://gitlab.iscpif.fr/gargantext/haskell-gargantext.git
46 47

cd haskell-gargantext
Alexandre Delanoë's avatar
Alexandre Delanoë committed
48
git clone https://gitlab.iscpif.fr/gargantext/purescript-gargantext
49 50

mkdir deps
Nicolas Pouillard's avatar
Nicolas Pouillard committed
51
cd deps
Alexandre Delanoë's avatar
Alexandre Delanoë committed
52
git clone https://gitlab.iscpif.fr/gargantext/clustering-louvain.git
53
git clone https://github.com/np/servant-job.git
54 55
git clone https://github.com/np/patches-map
git clone https://gitlab.com/npouillard/patches-class.git
56
git clone https://github.com/delanoe/haskell-opaleye
Alexandre Delanoë's avatar
Alexandre Delanoë committed
57
git clone -b next --single-branch https://github.com/delanoe/hsparql
58 59
cd ..

Alexandre Delanoë's avatar
Alexandre Delanoë committed
60 61 62 63
stack docker pull
stack --docker setup
stack --docker build
stack --docker install
64

65 66 67 68

# Database configuration
# CREATE USER gargantua WITH PASSWORD $(grep DB_PASS gargantext.ini)
# GRANT ALL PRIVILEGES ON DATABASE gargandbV4 to gargantua