---
applications:
  - name: notify-admin-((env))
    buildpack: python_buildpack
    stack: cflinuxfs4
    instances: ((instances))
    memory: ((memory))
    command: newrelic-admin run-program gunicorn -c /home/vcap/app/gunicorn_config.py application
    health-check-type: port
    health-check-invocation-timeout: 10
    routes:
      - route: ((public_admin_route))

    services:
      - notify-admin-redis-((env))
      - notify-api-csv-upload-bucket-((env))
      - notify-admin-logo-upload-bucket-((env))

    env:
      NOTIFY_ENVIRONMENT: ((env))
      NOTIFY_APP_NAME: admin
      NOTIFY_LOG_LEVEL: INFO
      FLASK_APP: application.py
      FLASK_DEBUG: "false"
      NEW_RELIC_CONFIG_FILE: newrelic.ini
      NEW_RELIC_ENVIRONMENT: ((env))

      NR_ACCOUNT_ID: 3389907
      NR_TRUST_KEY: 562946
      NR_AGENT_ID: ((nr_agent_id))
      NR_APP_ID: ((nr_app_id))
      NR_BROWSER_KEY: ((NR_BROWSER_KEY))

      REDIS_ENABLED: ((redis_enabled))
      ADMIN_BASE_URL: https://((public_admin_route))
      API_HOST_NAME: https://notify-api-((env)).apps.internal:61443

      # Credentials variables
      ADMIN_CLIENT_SECRET: ((ADMIN_CLIENT_SECRET))
      ADMIN_CLIENT_USERNAME: ((ADMIN_CLIENT_USERNAME))
      DANGEROUS_SALT: ((DANGEROUS_SALT))
      SECRET_KEY: ((SECRET_KEY))
      NEW_RELIC_LICENSE_KEY: ((NEW_RELIC_LICENSE_KEY))

      NOTIFY_BILLING_DETAILS: '[]'

      REQUESTS_CA_BUNDLE: "/etc/ssl/certs/ca-certificates.crt"
      NEW_RELIC_CA_BUNDLE_PATH: "/etc/ssl/certs/ca-certificates.crt"

      # login.gov variables

      LOGIN_PEM: ((LOGIN_PEM))
      LOGIN_DOT_GOV_CLIENT_ID: ((LOGIN_DOT_GOV_CLIENT_ID))
      LOGIN_DOT_GOV_USER_INFO_URL: ((LOGIN_DOT_GOV_USER_INFO_URL))
      LOGIN_DOT_GOV_ACCESS_TOKEN_URL: ((LOGIN_DOT_GOV_ACCESS_TOKEN_URL))
      LOGIN_DOT_GOV_LOGOUT_URL: ((LOGIN_DOT_GOV_LOGOUT_URL))
      LOGIN_DOT_GOV_BASE_LOGOUT_URL: ((LOGIN_DOT_GOV_BASE_LOGOUT_URL))
      LOGIN_DOT_GOV_SIGNOUT_REDIRECT: ((LOGIN_DOT_GOV_SIGNOUT_REDIRECT))
      LOGIN_DOT_GOV_INITIAL_SIGNIN_URL: ((LOGIN_DOT_GOV_INITIAL_SIGNIN_URL))
