apiVersion: apps/v1
kind: Deployment
metadata:
  name: gbv-dashboard
  labels:
    app: gbv-dashboard
spec:
  replicas: 1
  selector:
    matchLabels:
      app: gbv-dashboard
  template:
    metadata:
      labels:
        app: gbv-dashboard
    spec:
      containers:
        - name: gbv-dashboard
          image: localhost:5000/gbv-dashboard:registry
          imagePullPolicy: Always
          resources:
            requests:
              cpu: '10m'
              memory: '10Mi'
          ports:
            - containerPort: 3000
          envFrom:
            - secretRef:
                name: gbv-bot-envs
          env:
            - name: TYPEFORM_URL
              value: 'https://api.typeform.com'
            - name: FORMCENTRAL_URL
              value: 'http://gbv-formcentral'
            - name: CUBEJS_API_SECRET
              value: 'notasecret'
            - name: CUBEJS_DB_TYPE
              value: 'postgres'
            - name: DB_DATABASE
              value: 'chatroach'
            - name: CUBEJS_DB_NAME
              value: 'chatroach'
            - name: DB_USER
              value: 'chatroach'
            - name: CUBEJS_DB_USER
              value: 'chatroach'
            - name: DB_PASSWORD
              value: ''
            - name: CUBEJS_DB_PASS
              value: ''
            - name: DB_HOST
              value: 'gbv-cockroachdb-public.default'
            - name: CUBEJS_DB_HOST
              value: 'gbv-cockroachdb-public.default'
            - name: DB_PORT
              value: '26257'
            - name: CUBEJS_DB_PORT
              value: '26257'
            - name: TYPEFORM_REDIRECT_URL
              value: 'https://localhost:3000/surveys/auth'
            - name: FACEBOOK_GRAPH_URL
              value: 'https://graph.facebook.com/v9.0'
            - name: FACEBOOK_APP_ID
              value: '790352681363186'
