idmtools_platform_local.infrastructure.postgres module¶
idmtools postgres service. Used for experiment data.
Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.
- class idmtools_platform_local.infrastructure.postgres.PostgresContainer(container_name: str = 'idmtools_postgres', image: str = 'postgres:11.4', client: Optional[DockerClient] = None, config_prefix: str = 'postgres_', network: Optional[str] = None, host_data_directory: Optional[str] = None, port: int = 5432, mem_limit: str = '128m', mem_reservation: str = '32m', run_as: Optional[str] = None, password: str = 'idmtools', data_volume_name: str = 'idmtools_local_postgres')¶
Bases:
BaseServiceContainer
Defines the postgres container for the local platform.
- get_configuration() Dict ¶
Returns the docker config for the postgres container.
- Returns:
(dict) Dictionary representing the docker config for the postgres container
- create(spinner=None) Container ¶
Create our postgres container.
Here we create the postgres data volume before creating the container.
- __init__(container_name: str = 'idmtools_postgres', image: str = 'postgres:11.4', client: Optional[DockerClient] = None, config_prefix: str = 'postgres_', network: Optional[str] = None, host_data_directory: Optional[str] = None, port: int = 5432, mem_limit: str = '128m', mem_reservation: str = '32m', run_as: Optional[str] = None, password: str = 'idmtools', data_volume_name: str = 'idmtools_local_postgres') None ¶