Skip to content

Third-party port configs in the package are not respected when the services are bundled. #2065

@junhaoliao

Description

@junhaoliao

Bug

After #1681, CLP_DB_PORT, CLP_QUEUE_PORT, CLP_REDIS_PORT, and
CLP_RESULTS_CACHE_PORT are no longer set in controller.py for bundled services.
docker-compose-all.yaml uses these variables as published port for service port
bindings (e.g., published: "${CLP_DB_PORT:-3306}"). Since they are never set for
bundled services, Docker falls back to the hardcoded defaults (3306, 5672, 6379,
27017), making it impossible to customize the published host port for bundled
third-party services (e.g., to avoid port conflicts on the host or expose on a
non-default port).

This is analogous to #2055, which addressed the same regression for the CLP_*_HOST
variables (fixed in #2056). However, the port variables were not restored in that fix.

Note: a naive fix of simply restoring CLP_*_PORT in the bundled branch would break
inter-container connection strings (e.g., BROKER_URL, RESULT_BACKEND, JDBC URLs)
that also reference these variables, since bundled containers always listen on their
default internal ports regardless of the user-configured published port. The fix must
separate the published host port from the inter-container connection port.

CLP version

d754cbf98 (commit that introduced #1681) - 35b5ef1

Environment

Any environment running the CLP package with Docker Compose.

Reproduction steps

  1. Build the CLP package.
  2. Configure a non-default port for a bundled service in clp-config.yaml:
    database:
      port: 13306
  3. Start CLP:
    ./sbin/start-clp.sh
    
  4. Observe the generated .env file — CLP_DB_PORT is absent.
  5. Check the database container's published port:
    docker ps --format "table {{.Names}}\t{{.Ports}}" | grep database
    
  6. The port binding shows 127.0.0.1:3306->3306/tcp instead of the expected
    127.0.0.1:13306->3306/tcp.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions