apiVersion: apps/v1
kind: Deployment
metadata:
  name: site
spec:
  selector:
    matchLabels:
      app: site
  template:
    metadata:
      labels:
        app: site
    spec:
      containers:
        - name: site
          image: nginx:alpine
          ports:
            - containerPort: 80
          volumeMounts:
            - mountPath: /usr/share/nginx/html
              subPath: public
              name: static-website-volume
      volumes:
        - name: static-website-volume
          hostPath:
            path: ./public
            type: DirectoryOrCreate
