hotosm / osm-tasking-manager2

Designed and built for Humanitarian OpenStreetMap Team collaborative emergency/disaster mapping, the OSM Tasking Manager 2.0 divides an area into individual squares that can be rapidly mapped by thousands of volunteers.
http://tasks.hotosm.org
Other
425 stars 156 forks source link

Docker 2.13 #943

Closed davidvasandani closed 7 years ago

davidvasandani commented 7 years ago

cc @smit1678 and @bgirardot

If you download Docker for Mac you can follow the steps in DOCKER.md to deploy TM2 locally. Before the restore step if you browse to http://localhost:6543/ before the database restore step you'll see a working copy of TM2.

Restoring the DB returns 1900 errors from pg_restore and the following from the app server. ProgrammingError: (ProgrammingError) permission denied for relation task

bgirardot commented 7 years ago

@pgiraud Do you have any idea what might be going on here with those errors?

pgiraud commented 7 years ago

Restoring the DB returns 1900 errors from pg_restore and the following from the app server. ProgrammingError: (ProgrammingError) permission denied for relation task

This has to be confirmed but as far as I remember, the user that Drazen chose to use for the database owner is not "www-data".

In order to restore a database from the production server locally, here's the command is usually use:

pg_restore -d osmtm the_osmtm2_xxx.dmp -Ox --role=www-data
davidvasandani commented 7 years ago

@pgiraud Thank you. pg_restore -d osmtm /srv/osmtm2.dmp -Ox --role=www-data was what I was missing.

bgirardot commented 7 years ago

Hi @davidneudorfer , does this support both a development deploy and a production deploy?