Skip to content

[Bug] docker-compose-transformers.yml: NLP_CONF_FILE set as build ARG but missing from runtime environment #2048

Description

@sriram687

Summary

docker-compose-transformers.yml passes NLP_CONF_FILE only as a Docker
build-time ARG but omits it from the container's runtime environment: block.

Since app.py reads this value via os.environ.get("NLP_CONF_FILE") at
startup, the build ARG alone is not sufficient to guarantee the correct
NLP engine config is loaded at runtime — especially when the image is run
directly or in environments where build ENVs are not forwarded.

Change

Added NLP_CONF_FILE to the environment: section of presidio-analyzer
in docker-compose-transformers.yml so the build intent is explicitly
mirrored at runtime.

File changed: docker-compose-transformers.yml

     environment:
       - PORT=5001
+      - NLP_CONF_FILE=presidio_analyzer/conf/transformers.yaml

Why this matters

  • app.py reads NLP_CONF_FILE via os.environ.get() at runtime
  • Without this line, the env var is absent at runtime in override/run scenarios
  • Makes the config explicit and overridable without rebuilding the image

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions