Skip to content
Boney Bun edited this page May 2, 2017 · 3 revisions

docker-geosafe contains all docker images and "auto" configuration for running geonode, geoserver, inasafe, and qgis-server. Along with pycharm, developing the corresponding apps will make developers' life much easier as it provides an environment where a developer can choose to run either geonode geoserver or geonode qgis-server without actually install them in local machine.

Two main folder: src and deployment separates the two environment. src is for working with geonode geoserver deployment is for geonode, qgis-server, and inasafe. It also uses src folder

To use it, following step-by-step on the repo's readme is more than enough.

For newcomers and developers who works solely on a single repo (a.k.a. your own repo), setup the environment for several remote repos is essential as this will be helpful when you want to contribute to the open source community in the future. Please refer to another note for working with git. For now, setup the environment and make them running are the main focus of this note.

Although it has been well explained on the repo's readme, the following comments might be helpful to understand the steps (well, at least to me).

the good thing about git is you can pick your own directory at your convenience. so, make sure to create a folder with a lot of free storage as the docker images will soon eat up them all 😄

obtain source code

git init

git clone https://github.com/kartoza/docker-geosafe.git

#now, we have cloned the docker-geosafe.

#go to the parent directory

cd docker-geosafe

#update submodules as it depends on other repos

#basically, docker-geosafe is a pool of other open source projects

git submodule init

git submodule update

#don't panic if it errors.

#at this stage, dependent modules must be updated manually: geonode, geosafe, and inasafe.

#again, it's because the repo depend on other projects.

setup and running geonode - geoserver on src

cd src/geonode

git remote add lucernae https://github.com/lucernae/geonode.git

git fetch lucernae

geosafe

cd src/geosafe

git remote add lucernae https://github.com/lucernae/geosafe.git

git fetch lucernae

inasafe

cd src/geonode

git remote add lucernae https://github.com/lucernae/inasafe.git

git fetch lucerne

#go back to the parent directory

cd ../..

#then update again

git submodule update

#now, it’s time to build source for activating geonode+geoserver.

#make sure docker has run

cd src/geonode

make build

make up

make down

#this may seem unnecessary, but it's a must

#make sync will run the migrations

#migrations works like a flag to tell django that models have changed then need to be updated to database

make sync

setup and running geonode - qgis server - inasafe on deployment

cd ../deployment

The following steps must be done manually because it depends on your local configuration

  • rename deployment/ansible/development/group_vars/all.sample.yml to all.yml
  • change remote_user & remote_group to <your_local_login_name> & staff
  • change project_path to
  • change SITE_URL & GEONODE_BASE_URL to ip address -> run ifconfig in terminal to obtain ip address.

make setup-ansible

#copy deployment/docker-compose.override.sample.yml to docker-compose.override.yml

make build

make up

make sync