<commit_before>---
kind: Service
apiVersion: v1
metadata:
  name: backend
  annotations:
    revision: "{{CF_SHORT_REVISION}}"
  namespace: {{NAMESPACE}}
spec:
  ports:
  - protocol: TCP
    port: 8000
  type: NodePort
  selector:
    app: backend-container
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: backend
  labels:
    app: backend
  annotations:
    revision: "{{CF_SHORT_REVISION}}"
  namespace: {{NAMESPACE}}
spec:
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 1
  replicas: 1
  selector:
    matchLabels:
      app: backend-container
  template:
    metadata:
      labels:
        app: backend-container
    spec:
      containers:
        - name: backend
          image: unicef/unpp-backend:{{CF_SHORT_REVISION}}
          volumeMounts:
            - name: static-volume-{{NAMESPACE}}
              mountPath: /data
          command: ["bash"]
          args: ["-c", "gunicorn unpp_api.wsgi -c /code/gunicorn_config.py"]
          ports:
            - containerPort: 8000
          env:
            - name: SECRET_KEY
              valueFrom:
                secretKeyRef:
                  name: secret-key
                  key: password
            - name: EMAIL_HOST_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: email-host-password
                  key: password
            - name: ENV
              value: {{ENV}}
            - name: POSTGRES_DB
              value: {{POSTGRES_DB}}
            - name: POSTGRES_USER
              value: {{POSTGRES_USER}}
            - name: POSTGRES_HOST
              value: {{POSTGRES_HOST}}
            - name: DJANGO_ALLOWED_HOST
              value: {{DJANGO_ALLOWED_HOST}}
            - name: EMAIL_HOST
              value: "{{EMAIL_HOST}}"
            - name: EMAIL_PORT
              value: "{{EMAIL_PORT}}"
            - name: EMAIL_HOST_USER
              value: "{{EMAIL_HOST_USER}}"
            - name: MAP_BOX_KEY
              value: {{MAP_BOX_KEY}}
            - name: ELASTIC_APM_DEBUG
              value: "{{ELASTIC_APM_DEBUG}}"
            - name: ELASTIC_APM_SERVER_URL
              value: "{{ELASTIC_APM_SERVER_URL}}"
            - name: ELASTIC_APM_SERVICE_NAME
              value: "{{ELASTIC_APM_SERVICE_NAME}}"
            - name: UNHCR_API_HOST
              value: "{{UNHCR_API_HOST}}"
            - name: UNHCR_API_USERNAME
              value: "{{UNHCR_API_USERNAME}}"
            - name: UNHCR_API_PASSWORD
              value: "{{UNHCR_API_PASSWORD}}"
            - name: UNICEF_PARTNER_DETAILS_URL
              value: "{{UNICEF_PARTNER_DETAILS_URL}}"
            - name: UNICEF_API_USERNAME
              value: "{{UNICEF_API_USERNAME}}"
            - name: UNICEF_API_PASSWORD
              value: "{{UN<PASSWORD>API_PASSWORD}}"
            - name: WFP_API_HOST
              value: "{{WFP_API_HOST}}"
            - name: WFP_API_TOKEN
              value: "{{WFP_API_TOKEN}}"
            - name: SA_PASSWORD
              value: "{{SA_PASSWORD}}"
            - name: LEGACY_DB_HOST
              value: "{{LEGACY_DB_HOST}}"
            - name: ELASTIC_APM_SECRET_TOKEN
              valueFrom:
                secretKeyRef:
                  name: elastic-apm-secret-token
                  key: password
          readinessProbe:
            tcpSocket:
              port: 8000
            initialDelaySeconds: 5
            periodSeconds: 5
            successThreshold: 1

      volumes:
      - name: static-volume-{{NAMESPACE}}
        persistentVolumeClaim:
          claimName: static-volume-claim-{{NAMESPACE}}

      hostAliases:
       - ip: "{{WFP_API_IP}}"
         hostnames:
         - "{{WFP_API_HOST}}"
<commit_msg>Added AZURE_B2C vars<commit_after>---
kind: Service
apiVersion: v1
metadata:
  name: backend
  annotations:
    revision: "{{CF_SHORT_REVISION}}"
  namespace: {{NAMESPACE}}
spec:
  ports:
  - protocol: TCP
    port: 8000
  type: NodePort
  selector:
    app: backend-container
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: backend
  labels:
    app: backend
  annotations:
    revision: "{{CF_SHORT_REVISION}}"
  namespace: {{NAMESPACE}}
spec:
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 0
      maxSurge: 1
  replicas: 1
  selector:
    matchLabels:
      app: backend-container
  template:
    metadata:
      labels:
        app: backend-container
    spec:
      containers:
        - name: backend
          image: unicef/unpp-backend:{{CF_SHORT_REVISION}}
          volumeMounts:
            - name: static-volume-{{NAMESPACE}}
              mountPath: /data
          command: ["bash"]
          args: ["-c", "gunicorn unpp_api.wsgi -c /code/gunicorn_config.py"]
          ports:
            - containerPort: 8000
          env:
            - name: SECRET_KEY
              valueFrom:
                secretKeyRef:
                  name: secret-key
                  key: password
            - name: EMAIL_HOST_PASSWORD
              valueFrom:
                secretKeyRef:
                  name: email-host-password
                  key: password
            - name: ENV
              value: {{ENV}}
            - name: POSTGRES_DB
              value: {{POSTGRES_DB}}
            - name: POSTGRES_USER
              value: {{POSTGRES_USER}}
            - name: POSTGRES_HOST
              value: {{POSTGRES_HOST}}
            - name: DJANGO_ALLOWED_HOST
              value: {{DJANGO_ALLOWED_HOST}}
            - name: EMAIL_HOST
              value: "{{EMAIL_HOST}}"
            - name: EMAIL_PORT
              value: "{{EMAIL_PORT}}"
            - name: EMAIL_HOST_USER
              value: "{{EMAIL_HOST_USER}}"
            - name: MAP_BOX_KEY
              value: {{MAP_BOX_KEY}}
            - name: ELASTIC_APM_DEBUG
              value: "{{ELASTIC_APM_DEBUG}}"
            - name: ELASTIC_APM_SERVER_URL
              value: "{{ELASTIC_APM_SERVER_URL}}"
            - name: ELASTIC_APM_SERVICE_NAME
              value: "{{ELASTIC_APM_SERVICE_NAME}}"
            - name: UNHCR_API_HOST
              value: "{{UNHCR_API_HOST}}"
            - name: UNHCR_API_USERNAME
              value: "{{UNHCR_API_USERNAME}}"
            - name: UNHCR_API_PASSWORD
              value: "{{UNHCR_API_PASSWORD}}"
            - name: UNICEF_PARTNER_DETAILS_URL
              value: "{{UNICEF_PARTNER_DETAILS_URL}}"
            - name: UNICEF_API_USERNAME
              value: "{{UNICEF_API_USERNAME}}"
            - name: UNICEF_API_PASSWORD
              value: "{{UNICEF_API_PASSWORD}}"
            - name: WFP_API_HOST
              value: "{{WFP_API_HOST}}"
            - name: WFP_API_TOKEN
              value: "{{WFP_API_TOKEN}}"
            - name: SA_PASSWORD
              value: "{{SA_PASSWORD}}"
            - name: LEGACY_DB_HOST
              value: "{{LEGACY_DB_HOST}}"
            - name: ELASTIC_APM_SECRET_TOKEN
              valueFrom:
                secretKeyRef:
                  name: elastic-apm-secret-token
                  key: password
            - name: AZURE_B2C_CLIENT_ID
              value: "{{AZURE_B2C_CLIENT_ID}}"
            - name: AZURE_B2C_CLIENT_SECRET
              value: "{{AZURE_B2C_CLIENT_SECRET}}"
            - name: AZURE_B2C_POLICY_NAME
              value: "{{AZURE_B2C_POLICY_NAME}}"
          readinessProbe:
            tcpSocket:
              port: 8000
            initialDelaySeconds: 5
            periodSeconds: 5
            successThreshold: 1

      volumes:
      - name: static-volume-{{NAMESPACE}}
        persistentVolumeClaim:
          claimName: static-volume-claim-{{NAMESPACE}}

      hostAliases:
       - ip: "{{WFP_API_IP}}"
         hostnames:
         - "{{WFP_API_HOST}}"

{'fraction_non_alphanumeric': 0.09879891514916699, 'fraction_numerical': 0.0063282965258943565, 'mean_word_length': 1.5532476096274317, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1536212', 'n_tokens_mistral': 2489, 'n_tokens_neox': 2427, 'n_words': 444}