forked from camptocamp/demo_geomapfish
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CONST_vars.yaml
478 lines (427 loc) · 15.4 KB
/
CONST_vars.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
vars:
# project instance id
instanceid: INSTANCE_ID
# is in developement mode
development: DEVELOPMENT
# the package name
package: demo
srid: -1
host: VISIBLE_WEB_HOST
web_protocol: VISIBLE_WEB_PROTOCOL
# the Unix user under which the modwsgi daemon processes are executed.
modwsgi_user: MODWSGI_USER
# url-path where the instance must respond.
apache_entry_point: APACHE_ENTRY_POINT
# Docker base image name (comes from the makefile).
docker_base: DOCKER_BASE
docker: DOCKER
# database user
dbuser: www-data
# database password
dbpassword: www-data
# database host
dbhost: localhost
# database port
dbport: 5432
# database name
db: override_me
# sqlalchemy schema
schema: main
# database parent schema
parentschema: ""
dbsessions: {}
# apache/mapserver.conf "Allow" statement
mapserv_allow: |
Allow from 127.0.0.1 ::1
Require ip 127.0.0.1 ::1
# mapserver connexion string
mapserver_connection: user={dbuser} password={dbpassword} dbname={db} host={dbhost}
# mapserver join tables
mapserver_join_tables: '{schema}.restrictionarea AS ra, {schema}.role_restrictionarea AS rra, {schema}.layer_restrictionarea AS lra, {schema}.treeitem AS la'
# mapserver visible area
mapserver_join_area: ra.area
# mapserver join close
mapserver_join_where: 'rra.role_id = %role_id% AND rra.restrictionarea_id = ra.id AND lra.restrictionarea_id = ra.id AND lra.layer_id = la.id AND la.name = '
# mapserver metadata for validation
mapserver_layer_metadata: ""
mapserver_layer_validation: |
"default_role_id" "-1"
"role_id" "^-?[0-9]*$"
# mapfile data subselect
mapfile_data_subselect: 'SELECT ST_Collect(ra.area) FROM main.restrictionarea AS ra, main.role_restrictionarea AS rra, main.layer_restrictionarea AS lra, main.treeitem AS la WHERE rra.role_id = %role_id% AND rra.restrictionarea_id = ra.id AND lra.restrictionarea_id = ra.id AND lra.layer_id = la.id AND la.name = '
# mapserver filter on role id only
mapfile_data_noarea_subselect: 'SELECT rra.role_id FROM {mapserver_join_tables} WHERE rra.restrictionarea_id = ra.id AND lra.restrictionarea_id = ra.id AND lra.layer_id = la.id AND la.name = '
# port for the waitress web server
waitress_port: 5000
enable_admin_interface: True
directory: __import__('os').getcwd()
python_path: __import__('distutils').sysconfig.get_python_lib()
# Authentication settings
authtkt:
# Cookie session secret
secret: __import__('uuid').uuid4().hex
cookie_name: auth_tkt_{instanceid}
# Database informations
sqlalchemy:
url: postgresql://{dbuser}:{dbpassword}@{dbhost}:{dbport}/{db}
# 10 days of default cache
default_max_age: 864000
# For debug mode
jsbuild:
config: "{directory}/jsbuild/app.cfg"
root_dir: "{directory}"
# used for the "node_modules" and "closure" static views
closure_library_path: 'process.stdout.write(require("closure-util").getLibraryPath())'
node_modules_path: "{directory}/node_modules"
# pyramid_closure configuration
# Each item in the roots_with_prefix array is an array with two elements. The
# first element is the path pyramid_closure passed to request.static_url. The
# second element is the file system path where js source files are searched.
# For this to work window.CLOSURE_BASE_PATH being set to the empty string in
# the HTML page.
pyramid_closure:
roots_with_prefix:
- ["{closure_library_path}/closure/goog", "{closure_library_path}/closure/goog"]
- ["{package}:static-ngeo/js", "{directory}/{package}/static-ngeo/js"]
- ["{package}:static-ngeo/components", "{directory}/{package}/static-ngeo/components"]
- ["{node_modules_path}/openlayers/src", "{node_modules_path}/openlayers/src"]
- ["{node_modules_path}/openlayers/build", "{node_modules_path}/openlayers/build"]
- ["{node_modules_path}/ngeo/src", "{node_modules_path}/ngeo/src"]
- ["{node_modules_path}/ngeo/contribs/gmf/src", "{node_modules_path}/ngeo/contribs/gmf/src"]
# The application's default language. This is the language used by
# the application if no specific language is specified in the URLs.
# This also defines the language used for the text search.
default_locale_name: fr
# The set of languages supported by the applications.
available_locale_names:
- en
- fr
- de
# All the application interfaces used to create the apache rewrite rules
interfaces: __import__('os').environ.get("INTERFACES").split(" ")
default_interface: desktop
# The dogpile.cache configuration.
#
# Do not touch if unsure.
#
# The cache section below takes three properties:
#
# - backend: the name of the cache backend (ex: dogpile.cache.memory,
# dogpile.cache.memcached, etc.). Mandatory.
# - expiration_time: the cache expiration time. Optional (infinite if not
# specified).
# - arguments: backend-specific arguments. Optional.
#
# Here is a dogpile.cache configuration example for the memcached backend
# (equivalent of http://dogpilecache.readthedocs.org/en/latest/api.html#dogpile.cache.backends.memcached.MemcachedBackend)
# cache:
# backend: dogpile.cache.memcached
# expiration_time: 3600
# arguments:
# url: 127.0.0.1:11211
cache:
backend: dogpile.cache.memory
admin_interface:
# Default values for the admin interface's maps.
map_x: 740000
map_y: 5860000
map_zoom: 10
# The list of available variable names for the `Metadatas` form.
available_metadata:
# Layers group
- name: isExpanded
type: boolean
# Layer
- name: copyTo
type: list
- name: copyable
type: boolean
- name: legend
type: boolean
- name: isLegendExpanded
type: boolean
- name: legendRule
- name: legendImage
type: url
- name: iconUrl
type: url
- name: metadataUrl
type: url
- name: disclaimer
- name: isChecked
type: boolean
- name: identifierAttributeField
- name: maxResolution
type: float
- name: minResolution
type: float
- name: opacity
type: float
- name: thumbnail
type: url
- name: timeAttribute
- name: lastUpdateDateColumn
- name: lastUpdateUserColumn
- name: snappingConfig
type: json
- name: geometry_validation
# WMS
- name: directedFilterAttributes
type: list
- name: enumeratedAttributes
type: list
# WMTS layers
- name: ogcServer
- name: wmsLayers
- name: queryLayers
- name: printLayers
# The list of functionalities that can be configured
# through the admin interface.
available_functionalities:
- default_basemap
- default_theme
- print_template
- mapserver_substitution
- filterable_layers
functionalities:
# Functionalities that are accessible to anonymous
# users.
anonymous:
print_template:
- 1 A4 portrait
- 2 A3 landscape
default_basemap: plan
# The name of the theme to use as the default theme.
# The default theme is the theme loaded when no
# theme name is specified in the mobile app URL. If unset
# then there is no default theme, and no theme information
# will be passed to the config.js template.
default_theme:
# Functionalities that are accessible to authenticated
# users with no associated functionalities in the
# database.
registered: {}
# Functionalities that are made available to Mako templates.
available_in_templates:
- default_basemap
- default_theme
- filterable_layers
- print_template
# Define URLs to the parent application. Only useful if
# this application is a child application in a parent/child
# architecture.
external_themes_url:
urllogin: {}
mapserverproxy:
default_ogc_server: source for image/png
tinyowsproxy:
# URL to internal TinyOWS instance
tinyows_url: http://localhost/{instanceid}/tinyows
# If the `online_resource` url in the TinyOWS configuration is not set
# to the TinyOWS proxy url (e.g. when the service is also used without
# the proxy), the proxy can replace the original `online_resource`
# url with the proxy url.
# proxy_online_resource: http://{host}/{instanceid}/tinyows_proxy
# online_resource: http://localhost/{instanceid}/tinyows
# When running a c2cgeoportal appl. in debug mode (with `make serve`)
# the host has to be set explicitly in a vhost environment.
# tinyows_host: {host}
resourceproxy:
# list of urls from which it is safe to load content
targets:
#exempletargetname: http://www.camptocamp.com/?param1=%s¶m2=%s
fulltextsearch:
defaultlimit: 30
maxlimit: 200
languages:
fr: french
en: english
de: german
servers:
internal: http://localhost/{instanceid}/
local: '{web_protocol}://{host}/{instanceid}/'
# The "raster web services" configuration. See the "raster"
# chapter in the integrator documentation.
raster: {}
# Used by enumeration in the query builder
layers:
geometry_validation: True
# Used to send an email on password reset
reset_password: {}
# The shortener base configuration
shortener:
# The base of created URL
base_url: '{web_protocol}://{host}{apache_entry_point}s/'
allowed_hosts:
- '{host}'
# Define whether the MapServer proxy should hide the OGC capabilities.
hide_capabilities: false
ogcproxy_enable: false
# For print proxy
print_url: http://localhost:8080/print-{instanceid}/print/{package}
pdfreport:
print_url: http://localhost:8080/print-{instanceid}/print/{package}
# For base layers
tiles_url:
- '{web_protocol}:://a.tiles.{host}/{instanceid}/tiles'
- '{web_protocol}:://b.tiles.{host}/{instanceid}/tiles'
- '{web_protocol}:://c.tiles.{host}/{instanceid}/tiles'
- '{web_protocol}:://d.tiles.{host}/{instanceid}/tiles'
wmtscapabilities_path: WMTSCAPABILITIES_PATH
ogcproxy_enable: False
# Control the HTTP headers
headers:
index: &header
access_control_max_age: 600 # 10 minutes
access_control_allow_origin:
- "*"
api: *header
profile: *header
raster: *header
echo: *header
csvecho: *header
exportgpxkml: *header
error: *header
themes: &auth_header
access_control_max_age: 600 # 10 minutes
access_control_allow_origin:
- "{web_protocol}:://{host}/"
- "*"
config: *auth_header
print: *auth_header
fulltextsearch: *auth_header
mapserver: *auth_header
tinyows: *auth_header
layers: *auth_header
shortener: *auth_header
login:
access_control_max_age: 600 # 10 minutes
access_control_allow_origin:
- "{web_protocol}:://{host}/"
# Checker configuration
checker:
defaults:
fulltextsearch: text to search
lang_files: [ngeo, cgxp-api]
phantomjs_routes:
- name: desktop
params:
no_redirect: "true"
forward_headers: []
routes_disable: []
themes:
default:
params:
version: "2"
all:
phantomjs_routes:
- name: desktop
params:
no_redirect: "true"
- name: mobile
params:
no_redirect: "true"
# phamtomjs 2.5 is required
# - name: desktop
# params:
# no_redirect: "true"
# debug: "true"
# - name: mobile
# params:
# no_redirect: "true"
# debug: "true"
routes:
- name: apijs
- name: xapijs
- name: printproxy_capabilities
# print V2
#- name: printproxy_info
- name: mapserverproxy
params:
SERVICE: WMS
VERSION: 1.1.1
REQUEST: GetCapabilities
- name: mapserverproxy
params:
SERVICE: WFS
VERSION: 1.1.0
REQUEST: GetCapabilities
main:
routes:
- name: apijs
- name: printproxy_capabilities
# Check collector configuration
check_collector:
disabled: [checker_pdf]
check_type:
all:
- name: checker_routes
display: Check pages
- name: checker_theme_errors
display: Errors in the themes
- name: checker_lang_files
display: Language files
- name: checker_pdf
display: Print PDF
- name: checker_pdf3
display: Print PDF
- name: checker_fts
display: FullTextSearch
- name: checker_phantomjs
display: PhantomJS generic test
main:
- name: checker_routes
display: Check pages
- name: checker_fts
display: FullTextSearch
- name: checker_phantomjs
display: PhantomJS generic test
default: # for children
- name: checker_phantomjs
display: PhantomJS generic test
hosts:
- display: demo
url: '{web_protocol}://{host}/{instanceid}/wsgi'
type: main
# What web page is authorized to use the API
authorized_referers:
- '{web_protocol}://{host}{apache_entry_point}'
# Hooks that can be called at different moments in the life of the
# application. The value is the full python name
# (full.module.path.function_name) of the function to call
hooks: {}
# after_settings: demo.after_settings_hook
# Called just after the settings have been loaded. Allows to modify
# the settings at runtime (they are constructed at build time).
# The function receives one parameter: the settings object.
# Statistics are disabled by default
stats: {}
db_chooser:
# List of {method path} regexes to force the usage of the master, even for GET and OPTIONS
# This supersedes the slave list.
master:
- GET /short/.* # The shortener updates the last_hit column on GET
# List of {method path} regexes to force the usage of the slave
slave:
- \w+ /printproxy/.* # The print proxy is never writing to the DB
interpreted:
python:
- authtkt.secret
- python_path
- directory
- interfaces
environment:
- modwsgi_user
- instanceid
- apache_entry_point
- docker
- docker_base
- development
- wmtscapabilities_path
- host
- web_protocol
node:
vars:
- closure_library_path
cmd: ["node", "-e"]
ignore_error: true