ajouté docker + modif update_db_osm
This commit is contained in:
parent
70a0772b29
commit
cab002333f
3
docker/.env
Normal file
3
docker/.env
Normal file
|
@ -0,0 +1,3 @@
|
|||
POSTGRES_USER=redadeg
|
||||
POSTGRES_PASSWORD=redadeg
|
||||
POSTGRES_DB=redadeg
|
3
docker/Dockerfile
Normal file
3
docker/Dockerfile
Normal file
|
@ -0,0 +1,3 @@
|
|||
FROM postgis/postgis:12-2.5
|
||||
|
||||
RUN apt update && apt install -y postgresql-12-pgrouting
|
12
docker/docker-compose.yml
Normal file
12
docker/docker-compose.yml
Normal file
|
@ -0,0 +1,12 @@
|
|||
version: "3.9"
|
||||
|
||||
services:
|
||||
db:
|
||||
build: .
|
||||
env_file: .env
|
||||
volumes:
|
||||
- ./dbdata:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
dbdata:
|
||||
|
|
@ -9,10 +9,10 @@ date
|
|||
echo ""
|
||||
|
||||
# on efface les dumps existants
|
||||
rm -f /data/dumps/*.pbf
|
||||
rm -f ~/dev/ar_redadeg/dataosm/dumps/*.pbf
|
||||
|
||||
# on récupère le dernier dump France
|
||||
wget -O /data/dumps/france-latest.osm.pbf http://download.geofabrik.de/europe/france-latest.osm.pbf
|
||||
wget -O ~/dev/ar_redadeg/dataosm/dumps/france-latest.osm.pbf http://download.geofabrik.de/europe/france-latest.osm.pbf
|
||||
|
||||
echo ""
|
||||
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
|
@ -24,7 +24,7 @@ echo ""
|
|||
|
||||
# on le decoupe selon un polygone
|
||||
# utiliser JOSM avec le plugin poly pour créer un fichier .poly
|
||||
osmconvert /data/dumps/france-latest.osm.pbf -B=/data/dumps/poly_extraction_bzh.poly --complete-ways -v -o=/data/dumps/breizh.osm.pbf
|
||||
osmconvert ~/dev/ar_redadeg/dataosm/dumps/france-latest.osm.pbf -B=~/dev/ar_redadeg/dataosm/dumps/poly_extraction_bzh.poly --complete-ways -v -o=~/dev/ar_redadeg/dataosm/dumps/breizh.osm.pbf
|
||||
|
||||
echo ""
|
||||
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
|
@ -36,7 +36,7 @@ echo ""
|
|||
|
||||
# on met à jour la base de données
|
||||
# authentification dans le pgpass
|
||||
osm2pgsql -H db.openstreetmap.local -U osmbr -d osm --hstore --slim --cache 3000 -E 3857 -v /data/dumps/breizh.osm.pbf
|
||||
osm2pgsql -H db.openstreetmap.local -U osmbr -d osm --hstore --slim --cache 3000 -E 3857 -v ~/dev/ar_redadeg/dataosm/dumps/breizh.osm.pbf
|
||||
|
||||
|
||||
echo ""
|
||||
|
|
Loading…
Reference in a new issue