apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    service: web
    tier: frontend
    role: api
  name: web
spec:
  selector:
    matchLabels:
      service: web
      tier: frontend
      role: api
  template:
    metadata:
      labels:
        service: web
        tier: frontend
        role: api
    spec:
      containers:
        - name: web
          image: gmri/neracoos-buoy-barn
          envFrom:
            - secretRef:
                name: buoy-barn-secrets
            - configMapRef:
                name: buoy-barn-config
          env:
            - name: DJANGO_MANAGEPY_MIGRATE
              value: "on"
            - name: DJANGO_MANAGEPY_COLLECTSTATIC
              value: "on"
          ports:
            - containerPort: 8080
              name: http
          volumeMounts:
            - name: django-static
              mountPath: /static
      volumes:
        - name: django-static
          emptyDir: {}
