PostgreSQL & PostGIS
Database connectivity, management, health check, indexing, log
and other various DBA Activity related Documentation
LocusQ PostGIS
LocusQ PostGIS is a forked project of Geographica and changed according to LocusQ needs. It was further enhanced with automatically OSM data insertion.
Tools and Softwares
LocusQ PostGIS Docker will enable the following tools
- Postgresql 13.3
- PostGIS 3.1.2
- Proj4 6.3.1
- Geos 3.9.0
- GDAL 3.3.1
- osm2pgsql
Run the Docker
In all LocusQ project a configuration file conf.yml is the basic. Here you can find the configuration file format. For this stand alone LocusQ PostGIS project only the the following segment is going to be used for running the docker
## osm data definitions osmdata: continent: europe country: luxembourg datatype: pbf countrycode: LU countrycodelower: lu iso_a3: 'LUX' ## Postgres Config postgres: host: localhost user: renderer postgres_master_password: MasterPassword database: osmlu admin_user_password: UserPassword port: 5432 ...
It is recommended to unchange the host and port. Thest of the fields can be changed according user’s need. the country code, iso-3 names and other OSM data related documents can be found here.
Now it is the time to run. Before run a Docker network with a subnet mask need to declare. This is very important for stand alone LocusQ stacks. It is going to be used in several othe projects
docker network create --subnet=10.20.0.0/16 locusq
Docker Run Command
sudo docker run -ti --name locusq_postgres_postgis --network locusq \ -v $(pwd):/data -p 4701:5432 -d locusq/postgres-postgis:1.0.0
It will take a considerable time based on the size of the country. If a small country selected then it will be ready before completing a :coffee:. Whether the Postgres server is ready or not can be checked using following command
docker exec -it locusq_postgres_postgis status
If it returns PostgreSQL & PostGIS service is UP and Running... you are ready to go. But if it returns PostgreSQL & PostGIS service is not UP and Running... you have to wait more.
- Testing Environment – We have tested the service using a 6 core 16 GB Ram Digitalocean droplet. it took around 2 minutes to start the service with Luxembourg data.