mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-15 17:17:02 +02:00
Fix missing .env file
This commit is contained in:
parent
f16d657c6a
commit
2f9e16194e
3 changed files with 13 additions and 9 deletions
|
@ -15,10 +15,14 @@ from djangooidc import exceptions as o_e
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
try:
|
||||
# Initialize provider using pyOICD
|
||||
OP = getattr(settings, "OIDC_ACTIVE_PROVIDER")
|
||||
CLIENT = Client(OP)
|
||||
logger.debug("client initialized %s" % CLIENT)
|
||||
except Exception as err:
|
||||
logger.warning(err)
|
||||
logger.warning("Unable to configure OpenID Connect provider. Users cannot log in.")
|
||||
|
||||
|
||||
def error_page(request, error):
|
||||
|
|
|
@ -10,10 +10,6 @@ services:
|
|||
- db
|
||||
working_dir: /app
|
||||
entrypoint: python /app/docker_entrypoint.py
|
||||
env_file:
|
||||
# Non-version controlled file containing DJANGO_SP_PRIVATE_KEY
|
||||
# and other sensitive values
|
||||
- .env
|
||||
environment:
|
||||
# Send stdout and stderr straight to the terminal without buffering
|
||||
- PYTHONUNBUFFERED=yup
|
||||
|
@ -27,6 +23,9 @@ services:
|
|||
- DJANGO_DEBUG=True
|
||||
# Tell Django where it is being hosted
|
||||
- DJANGO_BASE_URL="localhost:8080"
|
||||
# --- These keys are obtained from `.env` file ---
|
||||
# Set a private JWT signing key for Login.gov
|
||||
- DJANGO_SECRET_LOGIN_KEY
|
||||
stdin_open: true
|
||||
tty: true
|
||||
ports:
|
||||
|
|
|
@ -46,7 +46,7 @@ env_debug = env.bool("DJANGO_DEBUG", default=False)
|
|||
env_log_level = env.str("DJANGO_LOG_LEVEL", "DEBUG")
|
||||
env_base_url = env.str("DJANGO_BASE_URL")
|
||||
|
||||
secret_login_key = b64decode(secret("DJANGO_SECRET_LOGIN_KEY"))
|
||||
secret_login_key = b64decode(secret("DJANGO_SECRET_LOGIN_KEY", ""))
|
||||
secret_key = secret("DJANGO_SECRET_KEY")
|
||||
|
||||
# region: Basic Django Config-----------------------------------------------###
|
||||
|
@ -389,6 +389,7 @@ OIDC_ALLOW_DYNAMIC_OP = False
|
|||
# (code does not currently support user selection)
|
||||
OIDC_ACTIVE_PROVIDER = "login.gov"
|
||||
|
||||
|
||||
OIDC_PROVIDERS = {
|
||||
"login.gov": {
|
||||
"srv_discovery_url": "https://idp.int.identitysandbox.gov",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue