<commit_before>apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: climate-watch-staging
  name: climate-watch-staging
  namespace: climate-watch
spec:
  progressDeadlineSeconds: 2147483647
  revisionHistoryLimit: 0
  selector:
    matchLabels:
      name: climate-watch-staging
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        name: climate-watch-staging
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: type
                    operator: In
                    values:
                      - climate-watch
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: name
                      operator: In
                      values:
                        - climate-watch-staging
                topologyKey: kubernetes.io/hostname
              weight: 100
      containers:
        - args:
            - start
          env:
            - name: CW_FILES_PREFIX
              value: climatewatch.org/staging.climatewatch.org/climate-watch/
            - name: RACK_ENV
              value: production
            - name: RAILS_ENV
              value: production
            - name: PORT
              value: "3000"
            - name: RAILS_SERVE_STATIC_FILES
              value: "true"
            - name: RAILS_LOG_TO_STDOUT
              value: "true"
            - name: POSTGRES_URL
              valueFrom:
                secretKeyRef:
                  key: CW_POSTGRES_URL_STAGING
                  name: dbsecrets
            - name: SHARED_POSTGRES_URL
              valueFrom:
                secretKeyRef:
                  key: CW_SHARED_POSTGRES_URL_STAGING
                  name: dbsecrets
            - name: S3_BUCKET_NAME
              value: wri-sites
            - name: AWS_REGION
              value: eu-west-1
            - name: AWS_ACCESS_KEY_ID
              valueFrom:
                secretKeyRef:
                  key: CW_PLATFORMS_S3_ACCESS_KEY
                  name: appsecrets
            - name: AWS_SECRET_ACCESS_KEY
              valueFrom:
                secretKeyRef:
                  key: CW_PLATFORMS_S3_SECRET_ACCESS_KEY
                  name: appsecrets
            - name: ESP_API
              value: https://data.emissionspathways.org/api/v1
            - name: GFW_API
              value: https://production-api.globalforestwatch.org
            - name: CORS_WHITELIST
              value: '*'
            - name: HTTP_AUTH_USERNAME
              valueFrom:
                secretKeyRef:
                  key: CW_HTTP_AUTH_USERNAME_STAGING
                  name: appsecrets
            - name: HTTP_AUTH_PASSWORD
              valueFrom:
                secretKeyRef:
                  key: CW_HTTP_AUTH_PASSWORD_STAGING
                  name: appsecrets
            - name: BASIC_AUTH
              value: "true"
            - name: REDIS_SERVER
              value: redis://localhost:6379
          image: vizzuality/climate-watch
          imagePullPolicy: Always
          name: climate-watch-staging
          ports:
            - containerPort: 3000
              protocol: TCP
          resources:
            requests:
              cpu: "0"
              memory: "0"<commit_msg>Align staging container resources with production<commit_after>apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    name: climate-watch-staging
  name: climate-watch-staging
  namespace: climate-watch
spec:
  progressDeadlineSeconds: 2147483647
  revisionHistoryLimit: 0
  selector:
    matchLabels:
      name: climate-watch-staging
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        name: climate-watch-staging
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: type
                    operator: In
                    values:
                      - climate-watch
        podAntiAffinity:
          preferredDuringSchedulingIgnoredDuringExecution:
            - podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: name
                      operator: In
                      values:
                        - climate-watch-staging
                topologyKey: kubernetes.io/hostname
              weight: 100
      containers:
        - args:
            - start
          env:
            - name: CW_FILES_PREFIX
              value: climatewatch.org/staging.climatewatch.org/climate-watch/
            - name: RACK_ENV
              value: production
            - name: RAILS_ENV
              value: production
            - name: PORT
              value: "3000"
            - name: RAILS_SERVE_STATIC_FILES
              value: "true"
            - name: RAILS_LOG_TO_STDOUT
              value: "true"
            - name: POSTGRES_URL
              valueFrom:
                secretKeyRef:
                  key: CW_POSTGRES_URL_STAGING
                  name: dbsecrets
            - name: SHARED_POSTGRES_URL
              valueFrom:
                secretKeyRef:
                  key: CW_SHARED_POSTGRES_URL_STAGING
                  name: dbsecrets
            - name: S3_BUCKET_NAME
              value: wri-sites
            - name: AWS_REGION
              value: eu-west-1
            - name: AWS_ACCESS_KEY_ID
              valueFrom:
                secretKeyRef:
                  key: CW_PLATFORMS_S3_ACCESS_KEY
                  name: appsecrets
            - name: AWS_SECRET_ACCESS_KEY
              valueFrom:
                secretKeyRef:
                  key: CW_PLATFORMS_S3_SECRET_ACCESS_KEY
                  name: appsecrets
            - name: ESP_API
              value: https://data.emissionspathways.org/api/v1
            - name: GFW_API
              value: https://production-api.globalforestwatch.org
            - name: CORS_WHITELIST
              value: '*'
            - name: HTTP_AUTH_USERNAME
              valueFrom:
                secretKeyRef:
                  key: CW_HTTP_AUTH_USERNAME_STAGING
                  name: appsecrets
            - name: HTTP_AUTH_PASSWORD
              valueFrom:
                secretKeyRef:
                  key: CW_HTTP_AUTH_PASSWORD_STAGING
                  name: appsecrets
            - name: BASIC_AUTH
              value: "true"
            - name: REDIS_SERVER
              value: redis://localhost:6379
          image: vizzuality/climate-watch
          imagePullPolicy: Always
          name: climate-watch-staging
          ports:
            - containerPort: 3000
              protocol: TCP
          resources:
            limits:
              cpu: "1"
              memory: 6G
            requests:
              cpu: 500m
              memory: 1G
{'fraction_non_alphanumeric': 0.05606312292358804, 'fraction_numerical': 0.010520487264673311, 'mean_word_length': 1.1940479805648345, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '92598', 'n_tokens_mistral': 2019, 'n_tokens_neox': 1860, 'n_words': 371}