apiVersion: apps/v1
kind: Deployment
metadata:
  name: backend
  namespace: staging
  labels:
    app: backend
spec:
  replicas: 2
  selector:
    matchLabels:
      app: backend
  template:
    metadata:
      labels:
        app: backend
    spec:
      containers:
      - name: backend
        image: gcr.io/mateo-burillo-ns/promcat-backend:staging
        imagePullPolicy: Always
        env:
          - name: DATABASE_URL
            valueFrom:
              secretKeyRef:
                name: promhub
                key: database-url
        ports:
        - containerPort: 8080
        readinessProbe:
          httpGet:
            path: /health
            port: 8080
