apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: server
    app.kubernetes.io/name: ghost
    app.kubernetes.io/part-of: ghost
    app.kubernetes.io/version: 4.19.0
  name: ghost
  namespace: blog
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/component: server
      app.kubernetes.io/name: ghost
      app.kubernetes.io/part-of: ghost
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app.kubernetes.io/component: server
        app.kubernetes.io/name: ghost
        app.kubernetes.io/part-of: ghost
        app.kubernetes.io/version: 4.19.0
    spec:
      containers:
      - env:
        - name: url
          value: https://pawel.krupa.net.pl
        image: ghost:4.19.0
        imagePullPolicy: IfNotPresent
        livenessProbe:
          initialDelaySeconds: 30
          periodSeconds: 60
          tcpSocket:
            port: 2368
          timeoutSeconds: 5
        name: ghost
        ports:
        - containerPort: 2368
          name: http
        resources:
          limits:
            cpu: 300m
            memory: 500Mi
          requests:
            cpu: 30m
            memory: 165Mi
        volumeMounts:
        - mountPath: /var/lib/ghost/content
          name: content
        - mountPath: /var/lib/ghost/content/logs
          name: logs
      restartPolicy: Always
      serviceAccountName: ghost
      volumes:
      - name: content
        persistentVolumeClaim:
          claimName: data
      - emptyDir: {}
        name: logs
