gws.server.manager

Configuration manager for embedded servers.

This object creates configuration files for embedded servers and the server startup script.

The configuration is template-based, there are following template subjects defined:

  • server.rsyslog_config - for the embedded rsyslogd daemon

  • server.uwsgi_config - for backend uWSGI servers (the uwsgi argument contains the specific backend name)

  • server.nginx_config - for the frontend NGINX proxy

Each template receives a TemplateArgs object as arguments.

By default, the Manager uses text-only templates from the templates directory.

Source code: gws.server.manager

Module Contents

class gws.server.manager.Object

Bases: gws.ServerManager

Server configuration manager.

configure()

Configuration hook.

configure_environment()

Overwrite config values from the environment.

configure_templates()
create_server_configs(target_dir, script_path, pid_paths)

Create server configuration files.

class gws.server.manager.TemplateArgs(*args, **kwargs)

Bases: gws.TemplateArgs

Arguments for configuration templates.

groupName: str

Group name.

gwsEnv: dict

A dict of GWS environment variables.

inContainer: bool

True if we’re running in a container.

mapproxyPid: str

Mapproxy pid path.

mapproxySocket: str

Mapproxy socket path.

nginxPid: str

nginx pid path.

root: gws.Root

Root object.

serverDir: str

Absolute path to app/server directory.

spoolPid: str

Spooler pid path.

spoolSocket: str

Spooler socket path.

userName: str

User name.

uwsgi: str

uWSGI backend name.

webPid: str

Web server pid path.

webSocket: str

Web server socket path.