Skip to content

Commit

Permalink
update: install_db.sh install_env.sh requirements.txt
Browse files Browse the repository at this point in the history
install_db.sh => work without geonature (geonature-atlas alone)
install_env.sh => add wget + use python3
requirements.txt => update greenlet
  • Loading branch information
juggler31 committed Sep 26, 2024
1 parent 5cfa411 commit 0f654cc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion install_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ if ! database_exists $db_name
# EN: Import of the shape of the communes ($communes_shp) in the DB (if parameter import_commune_shp = TRUE) / atlas.l_communes
if $import_commune_shp
then
ogr2ogr -f "ESRI Shapefile" -t_srs EPSG:4326 ./data/ref/communes_4326.shp $communes_shp
ogr2ogr -f "ESRI Shapefile" -t_srs EPSG:4326 ./data/ref/communes_4326.shp $communes_shp
sudo -u postgres -s shp2pgsql -W "LATIN1" -s 4326 -D -I ./data/ref/communes_4326.shp atlas.l_communes | sudo -n -u postgres -s psql -d $db_name &>> log/install_db.log
sudo -u postgres -s psql -d $db_name -c "ALTER TABLE atlas.l_communes RENAME COLUMN "$colonne_nom_commune" TO commune_maj;" &>> log/install_db.log
sudo -u postgres -s psql -d $db_name -c "ALTER TABLE atlas.l_communes RENAME COLUMN "$colonne_insee" TO insee;" &>> log/install_db.log
Expand Down Expand Up @@ -325,6 +325,9 @@ if ! database_exists $db_name
echo "Creating syntheseff example table"
sudo -n -u postgres -s psql -d $db_name -f /tmp/atlas/without_geonature.sql &>> log/install_db.log
sudo -n -u postgres -s psql -d $db_name -c "ALTER TABLE synthese.syntheseff OWNER TO "$owner_atlas";"

sudo -n -u postgres -s psql -d $db_name -c "ALTER TABLE utilisateurs.bib_organismes OWNER TO "$owner_atlas";"
sudo -n -u postgres -s psql -d $db_name -c "ALTER TABLE gn_meta.cor_dataset_actor OWNER TO "$owner_atlas";"
fi

# FR: Creation des Vues Matérialisées (et remplacement éventuel des valeurs en dur par les paramètres)
Expand Down
7 changes: 4 additions & 3 deletions install_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ sudo apt-get -y upgrade
# Go to folder of install_env.sh
cd "$(dirname "$0")"

sudo apt-get install -y wget
sudo apt-get install -y unzip
sudo apt-get install -y apache2
sudo a2enmod proxy
Expand Down Expand Up @@ -51,11 +52,11 @@ then
fi


sudo apt-get install -y python-setuptools
sudo apt-get install -y python3-setuptools
sudo apt-get install -y libpq-dev python3-dev

sudo apt-get install python-pip
sudo apt-get install -y python-gdal
sudo apt-get install python3-pip
sudo apt-get install -y python3-gdal
sudo apt-get install -y gdal-bin

sudo apt-get install -y python3-virtualenv virtualenv
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ geoalchemy2==0.9.4
# via -r requirements.in
geojson==2.5.0
# via -r requirements.in
greenlet==1.1.3
greenlet==3.0.3
# via sqlalchemy
gunicorn==20.1.0
# via -r requirements.in
Expand Down

0 comments on commit 0f654cc

Please sign in to comment.