]> Git — Sourcephile - gargantext.git/blob - devops/docker/install_garg_with_docker
[VERSION] +1 to 0.0.6.9.9.5.3
[gargantext.git] / devops / docker / install_garg_with_docker
1 #!/bin/bash
2
3
4 if git --version;
5 then
6 echo "git installed, ok"
7 else
8 sudo apt update && sudo apt install git
9 fi
10
11 if docker --version;
12 then
13 echo "Docker installed, ok"
14 else
15 curl -sSL https://get.docker.com/ | sh
16 echo "Docker has been installed"
17 echo "Configure your user rights:"
18 echo " sudo usermod -a -G docker $USER"
19 echo " or : adduser $(whoami) docker"
20 fi
21
22 echo "---------------script docker-----------------------------"
23
24 ########################################################################
25 # Docker path conf
26 if [ -f "/usr/local/bin/docker" ]
27 then
28 echo "docker alias exists already"
29 else
30 DOCKERBIN="/usr/local/bin/docker"
31 sudo touch $DOCKERBIN
32 sudo chmod o+w $DOCKERBIN
33 sudo echo "#!/bin/sh
34 exec sudo -E /usr/bin/docker \"\$@\"" >> $DOCKERBIN
35 sudo chmod gou+x $DOCKERBIN
36 sudo chmod o-w $DOCKERBIN
37 fi
38 ########################################################################
39
40 if stack --version;
41 then
42 echo "Haskell stack installed, ok"
43 else
44 curl -sSL https://get.haskellstack.org/ | sh
45 stack update
46 stack upgrade
47 fi
48
49 git clone https://gitlab.iscpif.fr/gargantext/haskell-gargantext.git
50
51 cd haskell-gargantext
52 git clone https://gitlab.iscpif.fr/gargantext/purescript-gargantext
53
54 ../install-deps $(pwd)
55
56 pushd devops/docker
57 docker build --pull -t fpco/stack-build:lts-18.12-garg .
58 popd
59
60 #stack docker pull
61 stack --docker setup
62 stack --docker build
63 stack --docker install
64
65
66 # Database configuration
67 # CREATE USER gargantua WITH PASSWORD $(grep DB_PASS gargantext.ini)
68 # GRANT ALL PRIVILEGES ON DATABASE gargandbV4 to gargantua