apiVersion: apps/v1
kind: Deployment
metadata:
  name: vaultwarden
  labels:
    app: vaultwarden
spec:
  replicas: 1
  selector:
    matchLabels:
      app: vaultwarden
  template:
    metadata:
      labels:
        app: vaultwarden
    spec:
      containers:
        - name: vaultwarden
          image: vaultwarden/server:latest
          resources:
            limits:
              memory: "512Mi"
              cpu: "500m"
          ports:
            - containerPort: 80
          env:
            - name: WEBSOCKET_ENABLED
              value: "true"
            - name: DOMAIN
              value: "https://vaultwarden.lotimmy.com"
            - name: ADMIN_TOKEN
              value: "$$argon2id$$v=19$$m=65540,t=3,p=4$$EVIbGzNlkQUK5b0r7aMgKoUWV98aqrpPevU+8Bbv0EE$$JB51q0ih0LGmw6rp7ZVBgT+PNnCepy+bNYyaChD+VMc"
          volumeMounts:
            - mountPath: "/data"
              name: data-vol
      volumes:
        - name: data-vol
          persistentVolumeClaim:
            claimName: vaultwarden-pvc
