]> Git — Sourcephile - gargantext.git/blob - devops/upgrade/0.0.6.1.sh
script update
[gargantext.git] / devops / upgrade / 0.0.6.1.sh
1 #!/bin/bash
2
3 # To be executed at the root of the project
4
5 # backup
6
7 sudo apt update
8 sudo apt upgrade
9
10 sudo sed -i "s/buster/bullseye/g" /etc/apt/sources.list
11 sudo apt update
12 sudo apt -yy dist-upgrade
13
14 git pull origin dev
15 ./bin/install
16
17 # Database upgrade
18 #./bin/psql gargantext.ini < devops/postgres/upgrade/0.0.6.0.sql
19 # exec script haskell upgrade
20
21 #./bin/psql gargantext.ini < devops/postgres/upgrade/0.0.6.1.sql
22 # ~/.local/bin/gargantext-upgrade
23
24
25 sudo sed -i "s/bullseye/bookworm/g" /etc/apt/sources.list
26 sudo apt update
27 sudo apt -yy dist-upgrade
28 sudo apt install -y postgresql-14 libpq-dev
29 sed -i "s/DB_PORT = 5432/DB_PORT = 5433/" gargantext.ini
30
31 DBPASS=$(grep "DB_PASS" gargantext.ini | sed "s/^.*= //")
32
33
34 sudo -i -u postgres bash << EOF
35 psql < 'ALTER ROLE gargantua password \'$DBPASS\'';
36 EOF
37
38
39 ./bin/psql gargantext.ini < devops/postgres/upgrade/0.0.6.2.sql
40
41
42
43
44