Skip to content
This repository has been archived by the owner on Jan 1, 2023. It is now read-only.

I cant configure environment variable to container #16

Open
matef opened this issue Oct 9, 2017 · 1 comment
Open

I cant configure environment variable to container #16

matef opened this issue Oct 9, 2017 · 1 comment

Comments

@matef
Copy link

matef commented Oct 9, 2017

Hi,
I'm trying to run a container that depends on some environment variables that I have to pass. I tried to add environment key like this but it seems not working.

env.docker_maps = ContainerMap('example_map', {
'repository': env.registry_prefix,
'host_root': env.host_root_path,
'excmd-service': {
'image': 'excmd:latest',
'instances': ('inst1'),
'environment': {
'MQ_IPADDRESS': env.app_mq_ip,
'DB_IPADDRESS': env.app_db_ip,
'MQ_TOPIC_NAME': env.MQ_TOPIC_NAME,
'DB_JOURNAL_KEYSPACE' : env.app_def_journal_kspace,
'DB_SNAPSHOT_KEYSPACE' : env.app_def_snapshot_kspace,
},

},    

})

@merll
Copy link
Owner

merll commented Oct 24, 2017

environment is currently not supported directly on the container configuration, but can be added in create_options:

env.docker_maps = ContainerMap('example_map',
    repository=env.registry_prefix,
    host_root=env.host_root_path,
    containers={
        'excmd-service': {
            'image': 'excmd:latest',
            'instances': 'inst1',
            'create_options': {
                'environment': {
                    'MQ_IPADDRESS': env.app_mq_ip,
                    'DB_IPADDRESS': env.app_db_ip,
                    'MQ_TOPIC_NAME': env.MQ_TOPIC_NAME,
                    'DB_JOURNAL_KEYSPACE' : env.app_def_journal_kspace,
                    'DB_SNAPSHOT_KEYSPACE' : env.app_def_snapshot_kspace,
                },
            },
         },
    })

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants