Sleep a little before trying to execute sql on pg for postgis template. Also fixed template setup for template_postgis
Updates for running docker with postgis