Open ajsween opened 3 years ago
Hi @ajsween
s6, the service manager in the container, blocks every single environment variable from being seen by the services it starts unless we specifically whitelist the environment variable by running "importas" and "export" for the env var.
I need to look into how to stop it from doing this, or have it whitelist all "PULP_" variables.
Best way to do this is to set S6_KEEP_ENV=1
https://dynaconf.readthedocs.io/en/docs_223/guides/environment_variables.html https://pulpproject.org/2018/09/25/pulp-3-adopts-dynaconf/ https://docs.pulpproject.org/pulpcore/configuration/applying.html#by-environment-variables
As documented by the dynaconf project and in the Pulp documentation, it should be possible to avoid configuration of the container via mounting the settings.py file to /etc/pulp/settings.py. However, when setting the environment variables using the "PULP_" prefix and excluding the settings.py file mount the
try
statement at https://github.com/pulp/pulpcore/blob/58873f3c80fa6cc3931b5b6591b9e856ff98581b/pulpcore/app/settings.py#L288 throws an exception stating thatCONTENT_ORIGIN
is not set.I added the following config to my docker-compose.yml file via a .env file and the env-file: attribute.
I've verified the variables are being correctly imported by dynaconf via a docker-exec into the running container and running
dynaconf list --all
Am I missing something?