apiVersion: apps/v1
kind: Deployment
metadata:
  name: plausible
spec:
  replicas: 1
  selector:
    matchLabels:
      app: plausible
  template:
    metadata:
      labels:
        app: plausible
    spec:
      containers:
        - name: plausible
          image: plausible/analytics:latest
          command:
            - sh
            - -c
            - "sleep 10 && /entrypoint.sh db createdb && /entrypoint.sh db migrate && /entrypoint.sh run"
          ports:
            - containerPort: 8000
          envFrom:
            - secretRef:
                name: plausible-env