Skip to content

Allow service to start without config file #16

@tpo

Description

@tpo

If the service gets started without a config file:

docker run -ti sourcepole/qwc-ldap-auth

then it will report an error:

[2025-04-16 09:05:33,979] ERROR in runtime_config: Could not load runtime config '/srv/qwc_service/config/default/ldapAuthConfig.json':
[Errno 2] No such file or directory: '/srv/qwc_service/config/default/ldapAuthConfig.json'

Is that a problem?

If not, then I propose to transform the ERROR into an INFO log message. Do you concur?

Note to self: this fixes the error:

$ cat ./ldapAuthConfig.json 
{
  "$schema": "https://github.com/qwc-services/qwc-ldap-auth/raw/master/schemas/qwc-ldap-auth.json",
  "service": "ldap-auth",
  "config": {
  }
}
$ docker run -ti  --mount type=bind,src=./ldapAuthConfig.json,dst=/srv/qwc_service/config/default/ldapAuthConfig.json sourcepole/qwc-ldap-auth

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions