QSA REST API : configuration

QSA web server can be configured thanks to the next environment variables:

MandatoryEnvironment variableDescription
YesQSA_QGISSERVER_URLQGIS Server URL
YesQSA_QGISSERVER_PROJECTS_DIRStorage location on the filesystem for QGIS projects/styles and QSA database
NoQSA_LOGLEVELLoglevel : DEBUG, INFO (default) or ERROR
NoQSA_QGISSERVER_PROJECTS_PSQL_SERVICEPostgreSQL service to store QGIS projects
NoQSA_QGISSERVER_MONITORING_PORTConnection port for qsa-plugin
NoQSA_MAPPROXY_PROJECTS_DIRStorage location on the filesystem for MapProxy configuration files
NoQSA_MAPPROXY_CACHE_S3_BUCKETActivate S3 cache for MapProxy if bucket is set
NoQSA_MAPPROXY_CACHE_S3_DIRS3 cache directory for MapProxy. Default to /mapproxy/cache
MapProxy

Time dimension caching is not supported with S3 backend storage.

PostgreSQL support

When PostgreSQL support is enabled to store QGIS projects thanks to the QSA_QGISSERVER_PROJECTS_PSQL_SERVICE environment variable, the directory QSA_QGISSERVER_PROJECTS_DIR is only used to store the QSA SQLite database as well as QGIS QML styles.

The PostgreSQL support relies on a service defined in a PostgreSQL connection service file.

For example with QSA_QGISSERVER_PROJECTS_PSQL_SERVICE=qsa_projects, a proper qsa_projects section is needed in ~/.pg_service.conf:

[qsa_projects]
host=localhost
port=5432
dbname=qsa_test
user=pblottiere
password=

A query string parameter can be used to specify a schema through the QSA API (public is used by default).

Roadmap

In the future, the QSA database and QGIS styles will also be stored in PostgreSQL when enabled.