- create an environment file .env in settings folder as .env.sample
For dev purpose use docker-compose-dev.yaml
, for prod use docker-compose-prod.yaml
- build and pull docker images
$ docker-compose -f docker-compose-prod.yaml build
- lunch the backend
$ docker-compose -f docker-compose-prod.yaml up -d
- Enable custom Style configurations
$ docker-compose -f docker-compose-prod.yaml exec web python manage.py seedCustomStyle --settings=settings.prod
- create a super user, you will use this credentials after
$ docker-compose -f docker-compose-prod.yaml exec web python manage.py createsuperuser --settings=settings.prod
- Setup elasticsearch
$ docker-compose -f docker-compose-prod.yaml exec web python manage.py search_index --rebuild --settings=settings.prod
- Load icons in prod
$ docker-compose -f docker-compose-prod.yaml exec web python manage.py loaddata --settings=settings.prod seed/icon.json
At this step your project is ready. To import OSM DATA, jump to Load OSM DATA section describe below
Import OSM data in database import_osm.MD
Edit import_foreign_osm_table.sql with the connection parameters of the foreign database and execute it :
$ docker-compose -f docker-compose-prod.yaml exec --user postgres db psql -d postgres -f /import_foreign_osm_table.sql
https://stackoverflow.com/questions/42385977/accessing-a-docker-container-from-another-container
docker run --network host --name kibana -e "ELASTICSEARCH_HOSTS=http://172.17.0.1:9200" -p 5601:5601 kibana:7.10.1
pg_dump --clean --exclude-schema osm_tables --exclude-schema sigfile --exclude-table 'planet_osm*' --no-acl --no-owner -d <database_name> -U <database_user> -h <database_host> -W | gzip > /path/to_store/data_osm_dump_$(date '+%Y-%m-%d_%H_%M_%S').sql.gz
icons/group/ icons/layer/ icons/picto/ icons/pictoQgis/ icons/Autres/ icons/sig-file/
To regenerate a layer
$ docker-compose -f docker-compose-prod.yaml exec web python manage.py reGenerateQgisProject <vector_id_of_the_layer> --settings=settings.prod
To regenerate all layers (can take much time)
$ docker-compose -f docker-compose-prod.yaml exec web python manage.py reGenerateQgisProject --settings=settings.prod