First commit

This commit is contained in:
2025-09-16 11:55:33 +02:00
parent 7e03981ca1
commit 53e4512274
5 changed files with 43 additions and 0 deletions

15
docker/scripts/init-db.sh Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
# init-db.sh
# Arrête le script si une commande échoue
set -e
echo "Enabling postgis_raster"
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
-- Activation de l'extension pour le raster
CREATE EXTENSION IF NOT EXISTS postgis_raster;
EOSQL
echo "Init database data with RGF93"
raster2pgsql -s RGF93 -I -C -M /opt/RAF20_lambert93.tiff -F -t 100x100 public.raf20lamber93 | psql -U ${POSTGRES_USER} -d ${POSTGRES_DB}
exit $?