gws.server

Configuration and management of embedded servers.

GWS runs several servers in the container: WSGI backend servers (Web and Mapproxy), the Spool server for background jobs and the frontend NGINX proxy.

This module provides configuration and control utilities for these facilities. It handles GWS startups and reloads.

The GWS startup sequence is the following:

  • the main script bin/gws invokes the start command in gws.server.cli

  • CLI delegates to gws.server.control

  • control invokes the Application configuration in gws.base.application.core.Object

  • the Application creates a ServerManager (gws.server.manager.Object)

  • the Manager creates configuration files for embedded servers and a startup shell script to start them

  • the control is returned to bin/gws, which invokes the startup script

  • the script starts the backends and finally NGINX, which keeps running in foreground

Source code: gws.server

Subpackages

Submodules

Package Contents

class gws.server.Config(*args, **kwargs)

Bases: gws.Config

Server module configuration

mapproxy: MapproxyConfig | None

Bundled Mapproxy module.

monitor: MonitorConfig | None

Monitor configuration.

log: LogConfig | None

Logging configuration.

qgis: QgisConfig | None

Qgis server configuration.

spool: SpoolConfig | None

Spool server module.

web: WebConfig | None

Web server module.

templates: list[gws.ext.config.template] | None

Configuration templates.

autoRun: str = ''

Shell command to run before server start.

timeout: gws.Duration = '60'

Server timeout.

timeZone: str = 'UTC'

Timezone for this server.