Skip to content

Commit

Permalink
Added first pass at gisquick
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Dec 24, 2017
1 parent 4c1af96 commit 9704810
Show file tree
Hide file tree
Showing 7 changed files with 339 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,3 +102,6 @@ ENV/

.idea
*.swp
.DS_Store
node_modules
package-lock.json
107 changes: 107 additions & 0 deletions templates/gisquick/0/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
# Base docker-compose file for rancher in staging environment
# This file has some specific tweaks for staging environment
# You can copy this file and paste it when creating a new stack in rancher
# It will try to sync related files

# Rancher currently only supports up to version 2
# If you want to use docker-swarm, create another orchestration with version 3
version: '2'
volumes:
postgres-data:
postgres-backups:
gis-data:
media:
publish:
certs:

services:

db:
image: kartoza/postgis:9.6-2.4
volumes:
- 'postgis-data:/var/lib/postgresql'
- 'backups:/backups'
environment:
- POSTGRES_DB=gis
- POSTGRES_USER=docker
- POSTGRES_PASS=docker
- ALLOW_IP_RANGE=0.0.0.0/0
expose:
- 5432
restart: unless-stopped
labels:
io.rancher.container.pull_image: always

qgisserver:
restart: always
image: gisquick/qgis-server
volumes:
- ./_data/publish:/publish/:ro
expose:
- "90"

django:
restart: always
image: gisquick/django
links:
- qgisserver
volumes:
- gis-data:/var/www/gisquick/data/
- media:/var/www/qisquick/media/
- publish:/publish/
environment:
- GUNICORN_WORKERS=2
- GUNICORN_ERRORLOG=-
- GUNICORN_ACCESSLOG=-
logging:
driver: json-file
options:
max-size: "10m"
max-file: "10"

nginx:
restart: unless-stopped
image: gisquick/nginx
links:
- django
volumes_from:
- django:ro
volumes:
- ./_data/etc/letsencrypt/:/etc/letsencrypt/
- ./_data/var/www/certbot/:/var/www/certbot/
ports:
- "443:443"
environment:
- NGINX_HOST=server
logging:
driver: json-file
options:
max-size: "10m"
max-file: "10"


# QGIS Server load balancer
web-lb:
image: rancher/lb-service-haproxy:v0.7.9
ports:
- "9000:9000"
links:
- qgisserver:qgisserver
labels:
io.rancher.container.agent.role: environmentAdmin
io.rancher.container.create_agent: 'true'
restart: unless-stopped

btsync-gis-data:
# BTSync backups for activity logs
image: kartoza/btsync
hostname: btsync-media
restart: unless-stopped
# activity logs is mounted as /logs in web container and
# as /web in btsync because btsync expects it there
volumes:
- gis-data:/web:rw
environment:
- SECRET=${BTSYNC_MEDIA_SECRET}
- DEVICE=GISQuickGISDataBackups

76 changes: 76 additions & 0 deletions templates/gisquick/0/rancher-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
version: '2'
catalog:
name: "GIS Quick"
description: "Gisquick is an open source geospatial data publishing platform by Marcel Dancák, Martin Landa, Jáchym Čepický, Ivan Minčík and Rastislav Mičaník. Rancher orchestration by Kartoza. It was developed for rapid sharing of our projects created with QGIS. We put together minimal set of functions for useful generic web mapping application. We created it for ourselves as well as for you. Let’s use it and share our great GIS outputs with others easily and much quicker."
version: 1
uuid: gisquick-0
questions:
- variable: QGIS_BACKEND_INSTANCE_COUNT
label: "Reporter backend instance count"
description: "How many OSM reporter rendering instances to start with."
required: true
default: 1
type: "int"
- variable: BTSYNC_MEDIA_SECRET
label: "Logs key"
description: "Resilio sync read/write key for syncing geojson activity logs"
required: false
default:
type: "string"
- variable: CREW
label: "Comma separated list of crew members"
description: "Valid OSM users names of people actively working on your data gathering project. When set, an additional tag will be added in the user profile areas to indicate those who are crew members."
required: false
default: ''
type: "string"
- variable: BBOX
label: "Initial BBOX for when page loads."
description: "Default bbox to use for the map and the stats. Format is: {SW_lng},{SW_lat},{NE_lng},{NE_lat}."
required: false
default: '20.411482,-34.053726,20.467358,-34.009483'
type: "string"
- variable: CACHE_DIR
label: "Directory to cache OSM files."
description: "Path to a dir where to cache the OSM files used by the backend. Note you may need to clear this directory out periodically."
required: false
default: '/tmp'
type: "string"
- variable: LOG_DIR
label: "Path to a dir where to store request logs in geojson format."
description: "OSM-Reporter will log requests as geojson files - one file per request. The attributes of each geojson file will contain the following:
feature_type (building, roads etc.)
qgis_version
inasafe_version (if applicable)
year / month / day / hour of request
bounding box of request as a GeoJSON geometry
If you use the btsync log sync option, make sure to leave this at its default value."
required: false
default: '/logs'
type: "string"
services:
web-lb:
scale: 1
start_on_create: true
lb_config:
certs: []
port_rules:
- hostname: web-lb
priority: 1
# we are forwarding to port 8080 so we need to use tcp not http
protocol: tcp
service: web
source_port: 9000
target_port: 90
health_check:
healthy_threshold: 2
response_timeout: 2000
port: 42
unhealthy_threshold: 3
initializing_timeout: 60000
interval: 2000
reinitializing_timeout: 60000
qgisserver:
scale: ${QGIS_BACKEND_INSTANCE_COUNT}
start_on_create: true
3 changes: 3 additions & 0 deletions templates/gisquick/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# GISQUICK

A GIS map publishing platform by GISLab - see http://gisquick.org.
29 changes: 29 additions & 0 deletions templates/gisquick/catalogIcon-gisquick.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
114 changes: 114 additions & 0 deletions templates/gisquick/catalogIcon-gisquick.svg.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->

<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="750"
height="100"
id="svg4155"
version="1.1"
inkscape:version="0.48.4 r9939"
sodipodi:docname="logo.svg">
<defs
id="defs4157" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.74725493"
inkscape:cx="41.149892"
inkscape:cy="17.225866"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1144"
inkscape:window-height="781"
inkscape:window-x="774"
inkscape:window-y="54"
inkscape:window-maximized="0" />
<metadata
id="metadata4160">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-952.3622)">
<g
id="g3031">
<g
id="text4109"
style="font-size:27.20816612px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:7.22430801px;word-spacing:0px;fill:#2ad4ff;fill-opacity:1;stroke:none;display:inline;font-family:Sans"
transform="matrix(1.008434,0,0,1.1000295,-8.9295595,-57.319519)">
<path
inkscape:connector-curvature="0"
id="path4610"
style="font-size:108.83266449000001330px;font-variant:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#00b8e5;font-family:MicrogrammaDEEBolExt;-inkscape-font-specification:MicrogrammaDEEBolExt;fill-opacity:1"
d="m 63.778479,955.50678 50.537041,0 c 0.0708,1.59427 0.10618,2.62166 0.10628,3.08218 -1e-4,9.49454 -0.2658,16.82799 -0.79711,22.00035 -0.85035,8.36085 -5.59761,13.42695 -14.241775,15.19831 -4.46392,0.88569 -9.352883,1.41709 -14.666902,1.59423 -5.633005,0.21256 -12.311045,0.31885 -20.034138,0.31885 -13.710402,0 -23.50604,-0.49599 -29.386945,-1.48795 -8.148292,-1.34623 -13.196677,-5.10152 -15.145171,-11.26588 -0.956542,-3.01131 -1.505664,-6.46546 -1.647369,-10.36249 -0.177141,-4.88894 -0.265709,-10.09674 -0.265705,-15.62343 -4e-6,-9.35276 0.442837,-15.92452 1.328524,-19.7153 1.275376,-5.2786 3.471867,-8.99846 6.589477,-11.1596 1.629643,-1.16903 3.666711,-2.05471 6.11121,-2.65704 2.47989,-0.63762 5.969476,-1.15132 10.468767,-1.54109 6.341452,-0.56676 14.91485,-0.85018 25.720219,-0.85026 13.887434,8e-5 23.7185,0.5492 29.493227,1.64737 5.845411,1.09832 9.954981,3.04682 12.328701,5.84551 2.09011,2.5154 3.36549,6.48325 3.82615,11.90357 0.10618,1.45257 0.15932,3.68449 0.15942,6.69576 l -22.106634,0 c -0.03551,-1.98388 -0.141787,-3.33012 -0.318846,-4.03871 -0.496059,-1.80674 -2.072572,-2.88727 -4.729545,-3.2416 -3.507371,-0.4605 -10.415688,-0.69078 -20.72497,-0.69083 -9.175713,5e-5 -15.534907,0.30118 -19.077601,0.90339 -3.365623,0.60232 -5.40269,2.44454 -6.111209,5.52666 -0.566863,2.33825 -0.850281,6.50095 -0.850255,12.48813 -2.6e-5,6.87292 0.301106,11.56703 0.903396,14.08235 0.779373,3.36561 3.188427,5.24325 7.227169,5.63294 1.983893,0.17715 7.971101,0.33657 17.961641,0.47827 10.911546,-0.0708 17.943858,-0.28341 21.096957,-0.6377 2.869535,-0.46053 4.516903,-1.7182 4.942108,-3.773 0.247913,-1.27536 0.371909,-3.22386 0.371987,-5.84551 l -29.068099,0 0,-14.50748" />
<path
inkscape:connector-curvature="0"
id="path4612"
style="font-size:108.83266449000001330px;font-variant:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#00b8e5;font-family:MicrogrammaDEEBolExt;-inkscape-font-specification:MicrogrammaDEEBolExt;fill-opacity:1"
d="m 130.46751,924.10048 23.22259,0 0,72.5374 -23.22259,0 0,-72.5374" />
<path
inkscape:connector-curvature="0"
id="path4614"
style="font-size:108.83266449000001330px;font-variant:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#00b8e5;font-family:MicrogrammaDEEBolExt;-inkscape-font-specification:MicrogrammaDEEBolExt;fill-opacity:1"
d="m 168.51357,972.61817 21.4158,0 c -0.0354,3.57818 0.69081,5.88095 2.17878,6.90832 0.77938,0.496 1.66506,0.83256 2.65705,1.00968 0.99194,0.17715 2.72787,0.30115 5.20781,0.37199 1.23992,0.0354 5.29635,0.0709 12.16928,0.10628 9.42361,-0.0354 14.87941,-0.0886 16.36741,-0.15942 2.7987,-0.21255 4.64091,-0.58454 5.52666,-1.11596 1.23989,-0.77939 1.85987,-2.51532 1.85994,-5.20782 -7e-5,-1.84219 -0.38977,-3.13529 -1.1691,-3.87929 -1.06289,-1.02736 -3.59594,-1.57648 -7.59916,-1.64737 -2.76339,3e-5 -8.53803,-0.21253 -17.32395,-0.63769 -9.06942,-0.4251 -14.95035,-0.67309 -17.6428,-0.74397 -7.01462,-0.21253 -11.95672,-1.02736 -14.82632,-2.44448 -3.68445,-1.80676 -6.0935,-4.88893 -7.22717,-9.24653 -0.63769,-2.40901 -0.95654,-5.56204 -0.95654,-9.45909 0,-8.21907 1.5588,-14.01143 4.67641,-17.37709 2.33819,-2.55069 5.88092,-4.23349 10.62819,-5.04839 4.28668,-0.70847 14.48973,-1.06274 30.60918,-1.06282 10.48643,8e-5 17.89072,0.30121 22.21292,0.9034 5.70372,0.8149 9.81328,2.23199 12.3287,4.25127 3.40093,2.79883 5.10144,7.81178 5.10153,15.03889 -9e-5,0.77946 -0.0178,2.01941 -0.0531,3.71987 l -21.4158,0 c -0.0709,-1.73589 -0.19492,-2.94041 -0.37199,-3.61358 -0.49605,-1.98388 -2.1257,-3.09984 -4.88897,-3.34788 -2.44454,-0.21251 -8.39632,-0.31879 -17.85535,-0.31885 -9.35285,6e-5 -14.89721,0.26576 -16.63312,0.79711 -1.94853,0.63775 -2.92278,2.28512 -2.92275,4.94211 -3e-5,2.55082 1.02736,4.10962 3.08217,4.67641 1.73591,0.4606 9.54762,0.90344 23.43516,1.32852 12.57663,0.35432 20.6009,0.79716 24.07285,1.32852 3.50722,0.53146 6.28826,1.32857 8.34313,2.39135 2.09012,1.06286 3.75521,2.56851 4.99525,4.51698 1.87755,2.86964 2.81638,7.4929 2.81647,13.86978 -9e-5,7.12091 -0.9212,12.34643 -2.76333,15.67658 -1.84231,3.29475 -4.85362,5.54438 -9.03396,6.74891 -4.10964,1.20452 -15.42866,1.80679 -33.95707,1.80679 -11.26591,0 -19.39647,-0.30114 -24.39169,-0.9034 -6.09352,-0.70854 -10.46878,-2.09021 -13.12582,-4.14499 -2.86962,-2.19649 -4.57012,-5.29637 -5.10153,-9.29967 -0.28342,-1.94849 -0.42513,-4.25126 -0.42513,-6.90832 l 0,-3.82615" />
<path
inkscape:connector-curvature="0"
id="path4616"
style="fill:#ffffff"
d="m 321.2378,923.03766 c 15.23367,8e-5 25.79099,0.38978 31.672,1.1691 8.46703,1.13375 13.65713,5.15474 15.5703,12.063 1.31071,4.74731 1.96611,12.7893 1.96622,24.12599 -1.1e-4,11.30133 -0.65551,19.32561 -1.96622,24.07285 -1.91317,6.90833 -7.10327,10.92932 -15.5703,12.063 -5.84558,0.7794 -16.61547,1.1691 -32.30969,1.1691 -15.65891,0 -26.4288,-0.3897 -32.3097,-1.1691 -8.46714,-1.13368 -13.65723,-5.15467 -15.5703,-12.063 -1.31081,-4.74724 -1.96622,-12.77152 -1.96621,-24.07285 -10e-6,-11.37211 0.6554,-19.4141 1.96621,-24.12599 1.91307,-6.90826 7.10316,-10.92925 15.5703,-12.063 5.91633,-0.77932 16.89878,-1.16902 32.94739,-1.1691 m -1.48795,18.86504 c -11.08878,6e-5 -17.81996,0.30119 -20.19356,0.9034 -2.86964,0.74402 -4.71186,2.42682 -5.52666,5.04839 -0.77942,2.58624 -1.16912,7.3512 -1.1691,14.29491 -2e-5,4.4993 0.23025,7.74089 0.69083,9.7248 0.88566,3.68446 3.56042,5.79238 8.02429,6.32377 3.2947,0.42514 9.63618,0.63771 19.02446,0.63769 9.38817,2e-5 15.72965,-0.21255 19.02446,-0.63769 4.46376,-0.53139 7.1208,-2.63931 7.97114,-6.32377 0.4959,-2.01933 0.74389,-5.15465 0.74397,-9.40595 -8e-5,-5.20778 -0.14179,-8.90992 -0.42512,-11.10646 -0.49607,-3.64896 -1.62974,-6.07573 -3.40103,-7.28031 -1.5943,-1.13362 -4.94218,-1.82445 -10.04363,-2.0725 -1.84229,-0.0708 -6.74897,-0.10622 -14.72005,-0.10628" />
<path
inkscape:connector-curvature="0"
id="path4618"
style="fill:#ffffff"
d="m 386.01375,924.10048 22.10663,0 0,33.31938 c 0.10626,7.65233 0.37196,12.48815 0.79712,14.50748 0.70851,3.43647 3.11757,5.45582 7.22717,6.05807 3.75525,0.56685 9.44133,0.85027 17.05824,0.85025 7.8648,2e-5 13.39145,-0.23026 16.57998,-0.69083 4.6409,-0.70853 7.22709,-3.36557 7.75858,-7.97114 0.42505,-3.71984 0.63761,-7.97111 0.63769,-12.75383 l 0,-33.31938 22.10663,0 0,33.31938 c -0.24809,11.62018 -0.62007,19.21933 -1.11596,22.79747 -0.88578,6.02265 -3.79081,10.46877 -8.71511,13.33837 -3.6491,2.09022 -9.77802,3.3656 -18.38677,3.82615 -3.96793,0.21256 -10.1677,0.31885 -18.59934,0.31885 -12.43502,0 -21.27412,-0.35428 -26.51733,-1.06282 -3.96788,-0.53141 -7.1209,-1.25767 -9.45909,-2.17878 -2.33821,-0.95653 -4.32214,-2.30277 -5.95178,-4.03871 -2.23193,-2.37362 -3.66674,-5.34951 -4.30442,-8.92768 -0.70855,-4.07412 -1.08054,-8.99851 -1.11596,-14.77319 l -0.10628,-9.29966 0,-33.31938" />
<path
inkscape:connector-curvature="0"
id="path4620"
style="fill:#ffffff"
d="m 497.34118,924.10048 23.22259,0 0,72.5374 -23.22259,0 0,-72.5374" />
<path
inkscape:connector-curvature="0"
id="path4622"
style="fill:#ffffff"
d="m 606.91496,968.6326 22.10664,0 c 0.14161,3.54275 0.21247,5.96952 0.21256,7.28031 -9e-5,5.27868 -0.83264,9.51224 -2.49762,12.70069 -1.73603,3.33017 -5.04848,5.65065 -9.93736,6.96146 -5.3496,1.45252 -14.59612,2.17878 -27.73958,2.17878 -14.4898,0 -24.25001,-0.23028 -29.28066,-0.69083 -4.67643,-0.3897 -8.36086,-1.00968 -11.05332,-1.85994 -2.69248,-0.85025 -4.9244,-2.0902 -6.69576,-3.71986 -2.37363,-2.19649 -3.87929,-5.10152 -4.51698,-8.71512 -0.70855,-3.7907 -1.06282,-11.08872 -1.06282,-21.89407 0,-10.38015 0.2657,-17.37704 0.79712,-20.99068 0.77939,-5.42031 2.88732,-9.35274 6.32377,-11.79729 2.62161,-1.84215 6.80202,-3.15295 12.54127,-3.93243 5.95175,-0.77932 16.63307,-1.16902 32.04399,-1.1691 9.1756,8e-5 15.71193,0.19493 19.60901,0.58455 5.88085,0.56691 10.16755,1.70058 12.86011,3.40102 3.33007,2.09028 5.43799,5.11931 6.32377,9.08711 0.6376,2.83424 0.95644,6.11126 0.95654,9.83107 -10e-5,0.63774 -0.0178,2.03712 -0.0531,4.19814 l -22.10664,0 c -0.0709,-1.77132 -0.14178,-2.97585 -0.21256,-3.61359 -0.28349,-2.16101 -1.25774,-3.52496 -2.92275,-4.09185 -2.51541,-0.8502 -9.3883,-1.27533 -20.61869,-1.27538 -7.65234,5e-5 -12.931,0.21262 -15.83601,0.63769 -3.54276,0.49603 -5.73925,2.42682 -6.58947,5.79236 -0.67315,2.72795 -1.00971,7.12093 -1.00968,13.17896 -3e-5,6.23523 0.33653,10.53964 1.00968,12.91325 0.85022,3.08219 3.18842,4.87127 7.0146,5.36723 3.11757,0.38972 8.59108,0.58457 16.42056,0.58455 8.46706,2e-5 14.24171,-0.17712 17.32394,-0.53141 2.90497,-0.31882 4.74719,-1.36393 5.52666,-3.13531 0.63762,-1.48793 0.99189,-3.91469 1.06282,-7.28031" />
<path
inkscape:connector-curvature="0"
id="path4624"
style="fill:#ffffff"
d="m 644.21706,924.10048 22.10664,0 0,26.30477 12.11613,0 28.69612,-26.78304 33.79764,0 -41.92821,36.08271 45.48865,36.93296 -33.58508,0 -32.46912,-27.73958 -12.11613,0 0,27.73958 -22.10664,0 0,-72.5374" />
</g>
<rect
transform="matrix(0.57705821,-0.81670302,0.79645451,0.60469845,0,0)"
y="840.20953"
x="-610.1391"
height="66.948769"
width="16.243031"
id="rect4121"
style="fill:#ffffff;fill-opacity:1;stroke:#ffffff;stroke-width:1.83404481;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;display:inline" />
</g>
</g>
</svg>
7 changes: 7 additions & 0 deletions templates/gisquick/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: GIS Quick
description: A slick and easy to use map publishing platform.
version: 1
category: GIS
maintainer: Kartoza (Pty) Ltd. - Tim Sutton, tim@kartoza.com
license: GPL v3
projectURL: http://gisquick.org

0 comments on commit 9704810

Please sign in to comment.