/wazimap-ng

Primary LanguagePythonApache License 2.0Apache-2.0

Prerequisites

Local Development

Start the dev server for local development. Before you've created your database, the webserver will break because it can't find the database.

docker-compose up

Load up the database

docker exec --user=postgres wazimap-ng_db_1 createdb -O wazimap_ng  wazimap_ng

Create the database extensions - your user should have superuser privileges

echo "create extension postgis;" | psql -U wazimap_ng -h localhost wazimap_ng
echo "create extension pg_trgm;" | psql -U wazimap_ng -h localhost wazimap_ng

curl https://wazimap-ng.s3-eu-west-1.amazonaws.com/wazimap-ng.dump-20200108.gz | gunzip -c | docker exec -i wazimap-ng_db_1 pg_restore -U postgres -d wazimap_ng


If this is the first time you're running this, bring the containers down, then up again
```bash
docker-compose down
docker-compose up

Production

To build a new image:

./scripts/docker_build.sh

Note, this currently logs into adieyal on docker-hub. This will be moved to the OpenUp account in future.

```