Añadir pgtilesrv_config.sh

This commit is contained in:
2026-05-14 22:25:27 -04:00
parent 58ad5fa2f7
commit 2ae12c8e28

8
pgtilesrv_config.sh Normal file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
eval MIDOMINIO=$(docker exec arches_db printenv DOMAINS)
eval MIPROY=$(docker exec arches_db printenv COMPOSE_PROJECT_NAME)
MISQL="INSERT INTO map_sources (name, source) VALUES ('ponderacion-pg-tilesrv', '{\"type\": \"vector\", \"tiles\": [\"https://$MIDOMINIO/pgtileserv/public.ponderacion/{z}/{x}/{y}.pbf\"], \"tileSize\": 512}') ON CONFLICT DO NOTHING RETURNING *;"
docker exec arches_db psql -U postgres -d $MIPROY -c "$MISQL"