apiVersion: apps/v1
kind: Deployment
metadata:
    name: web
spec:
    replicas: 1
    selector:
        matchLabels:
            app: web
    template:
        metadata:
            labels:
                app: web
        spec:
            containers:
                - args:
                      - ./querybook/scripts/bundled_docker_run_web
                      - --initdb
                  env:
                      - name: PORT
                        value: '10001'
                      - name: FLASK_SECRET_KEY
                        value: SOME_RANDOM_SECRET_KEY
                      - name: DATABASE_CONN
                        value: mysql+pymysql://test:passw0rd@mysql:3306/querybook2?charset=utf8mb4
                      - name: REDIS_URL
                        value: redis://redis:6379/0
                      - name: ELASTICSEARCH_HOST
                        value: elasticsearch:9200
                  image: querybook/querybook:latest
                  name: web
                  ports:
                      - containerPort: 10001
                  resources:
                      requests:
                          memory: '800Mi'
                          cpu: '500m'
                      limits:
                          memory: '3Gi'
                          cpu: '1'
            restartPolicy: Always
