Skip to content

Got error "Expected to decode Int but found Scalar instead." if i use an env var in an assignment to "replicas" #95

Description

@ar4hc

Hi,

stumbled upon this:

Error: DecodingError.typeMismatch: expected value of type Int. Path: services.<oo.deploy.replicas. Debug description: Expected to decode Int but found Scalar instead.

when running

container-compose up --env-file .env -f compose.yml

Relevant parts of the Docker compose yaml looks like this

    deploy:
      mode: replicated
      replicas: ${CORES}

and in .env is

CORES=1

(not CORES="1")

I assume the Decoder looks at this before the variable is resolved...?
So it seed the string "${CORES}" instead of the "1", as the value, from the .env file?

Can i work around this somehow? (other than hard coding the values in the compose file...)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions