opensampl.config.server
Pydantic BaseSettings Object used to access and set the openSAMPL-server configuration options.
This module provides the main configuration class for openSAMPL-server, handling environment variables, configuration validation, and settings management.
ServerConfig
Bases: BaseConfig
Configuration specific to server-side CLI operations.
Source code in opensampl/config/server.py
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 |
|
build_docker_compose_base()
Build the docker compose command, including env file and compose file
Source code in opensampl/config/server.py
87 88 89 90 91 92 |
|
get_compose_command()
staticmethod
Detect the available docker-compose command.
Source code in opensampl/config/server.py
78 79 80 81 82 83 84 85 |
|
get_db_url()
Return the database URL for the Timescale db that will be created with the docker-compose environment.
Source code in opensampl/config/server.py
114 115 116 117 118 119 120 121 |
|
get_docker_values()
Get the values that the docker containers will use on startup
Source code in opensampl/config/server.py
56 57 58 59 60 |
|
resolve_compose_file(v)
classmethod
Resolve the provided compose file for docker to use, or default to the docker-compose.yaml provided
Source code in opensampl/config/server.py
62 63 64 65 66 67 68 |
|
resolve_docker_env_file(v)
classmethod
Resolve the provided env file for docker containers to use, or default to the default.env provided
Source code in opensampl/config/server.py
70 71 72 73 74 75 76 |
|
set_by_name(name, value)
Set setting's value in the env file for current instance.
Uses env_prefix for ServerConfig-specific fields, base name for inherited fields.
Source code in opensampl/config/server.py
94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
|
get_resolved_resource_path(pkg, relative_path)
Retrieve the resolved path to a resource in a package.
Source code in opensampl/config/server.py
24 25 26 27 28 |
|