Skip to content
This repository was archived by the owner on Sep 12, 2018. It is now read-only.
This repository was archived by the owner on Sep 12, 2018. It is now read-only.

Duplicate settings for which port to bind to for HTTP #368

@jlhawn

Description

@jlhawn

The README assumes you want to run it on port 5000, but say I want to run it on port 80? There appears to be no setting in the config.yml file for this. I searched for where the server starts listening for connections but it looks like there are at least 3 different places which try to configure this and it's quite confusing:

  1. docker_registry/wsgi.py
    looks like this file says you can set a PORT_WWW environment variable defaulting to 5000, but this is only if you run this file directly from the command line, so this must not be what the Docker container uses when it starts.
  2. config/gunicorn_config.py
    I'm not sure how you start the server using this config file, but it uses PORT_WWW as well, but defaults to 8000 instead, wut?
  3. docker_registry/__init__.py
    Starting from the Dockerfile, it looks like we pip install the /docker_registry/ directory. The setup.py file specifies docker-registry as a console script which runs docker_registry:run_gunicorn. Reading docker_registry/__init__.py it uses REGISTRY_PORT and defaults to 5000. It also does os.execl on the gunicorn executable path and specifies a bunch of command line options. Why not just specify the config/gunicorn_config.py module instead?

In conclusion, it looks like REGISTRY_PORT is the correct environment variable to use to change the server port. Let's make that more obvious, clean, and consistent.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions