Skip to content

Make host/port env vars available for substitution in setenv #55

Open
@thenewguy

Description

@thenewguy

Have had a little bit of a trouble getting elastic/apm-server:7.7.0 image working with tox. One problem I am not able to workaround easily is configuration by environment variables using the variables set by tox-docker.

If the host and port environment variables were available for substitution during setenv it would be helpful:

setenv =
    ...
    ELASTIC_APM_SERVER_URL=http://{env:ELASTIC_APM_SERVER_HOST}:{env:ELASTIC_APM_SERVER_8200_TCP_PORT}

Attempting to set ELASTIC_APM_SERVER_URL to the connection string for apm-server raises tox.exception.MissingSubstitution: MissingSubstitution: ELASTIC_APM_SERVER_HOST.

Here is the relavent configuration to run the apm-server image:

docker =
    ...
    elastic/apm-server:7.7.0
[docker:elastic/apm-server:7.7.0]
healthcheck_cmd = true
healthcheck_interval = 15
healthcheck_timeout = 15
healthcheck_retries = 30
healthcheck_start_period = 10
ports = 8200/tcp

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