Files
realZ/docker/scripts/init-db.sh

16 lines
482 B
Bash
Raw Normal View History

2025-09-16 11:55:33 +02:00
#!/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 $?