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
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 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 | |
build_docker_compose_base()
Build the docker compose command, including env file and compose file
Source code in opensampl/config/server.py
101 102 103 104 105 106 107 108 | |
get_compose_command()
staticmethod
Detect the available docker-compose command.
Source code in opensampl/config/server.py
92 93 94 95 96 97 98 99 | |
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
130 131 132 133 134 135 136 137 | |
get_docker_values()
Get the values that the docker containers will use on startup
Source code in opensampl/config/server.py
62 63 64 65 66 | |
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
68 69 70 71 72 73 74 | |
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
84 85 86 87 88 89 90 | |
resolve_override_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
76 77 78 79 80 81 82 | |
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
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
get_resolved_resource_path(pkg, relative_path)
Retrieve the resolved path to a resource in a package.
Source code in opensampl/config/server.py
28 29 30 31 32 | |