stack.basicstack.de/apps/paperclip/deployment.yaml
CTO Agent c0dd78d172 Use exec probe for health checks instead of HTTP probe
The /api/health endpoint returns 403 when accessed externally but works from localhost. Changed readiness and liveness probes to use exec with wget from inside the container to work around this restriction.

Resolves: DEV-387

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-07-26 10:07:16 +00:00

124 lines
3.2 KiB
YAML

apiVersion: apps/v1
kind: Deployment
metadata:
name: paperclip
namespace: paperclip
spec:
replicas: 1
selector:
matchLabels:
app: paperclip
strategy:
type: Recreate
template:
metadata:
labels:
app: paperclip
spec:
securityContext:
fsGroup: 1000
fsGroupChangePolicy: Always
initContainers:
- name: fix-permissions
image: busybox:1.36
command:
- sh
- -c
- |
mkdir -p /paperclip/scripts
chmod -R 777 /paperclip
volumeMounts:
- name: data
mountPath: /paperclip
containers:
- name: paperclip
image: ghcr.io/paperclipai/paperclip:latest
imagePullPolicy: Always
ports:
- containerPort: 3100
name: http
protocol: TCP
env:
- name: HOST
value: "0.0.0.0"
- name: PORT
value: "3100"
- name: PAPERCLIP_HOME
value: "/paperclip"
- name: PAPERCLIP_PUBLIC_URL
value: "https://paperclip.home.imicros.de"
- name: PAPERCLIP_DEPLOYMENT_MODE
value: "authenticated"
- name: PAPERCLIP_DEPLOYMENT_EXPOSURE
value: "private"
- name: PAPERCLIP_MIGRATION_PROMPT
value: "never"
- name: PAPERCLIP_MIGRATION_AUTO_APPLY
value: "true"
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: paperclip-secrets
key: DATABASE_URL
- name: BETTER_AUTH_SECRET
valueFrom:
secretKeyRef:
name: paperclip-secrets
key: BETTER_AUTH_SECRET
- name: AGENT_JWT_SECRET
valueFrom:
secretKeyRef:
name: paperclip-secrets
key: AGENT_JWT_SECRET
- name: OPENAI_API_KEY
valueFrom:
secretKeyRef:
name: paperclip-secrets
key: OPENAI_API_KEY
- name: ANTHROPIC_API_KEY
valueFrom:
secretKeyRef:
name: paperclip-secrets
key: ANTHROPIC_API_KEY
volumeMounts:
- name: data
mountPath: /paperclip
readinessProbe:
exec:
command:
- wget
- --quiet
- --tries=1
- --timeout=3
- --spider
- http://localhost:3100/api/health
initialDelaySeconds: 20
periodSeconds: 10
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
livenessProbe:
exec:
command:
- wget
- --quiet
- --tries=1
- --timeout=3
- --spider
- http://localhost:3100/api/health
initialDelaySeconds: 30
periodSeconds: 30
timeoutSeconds: 5
successThreshold: 1
failureThreshold: 3
resources:
limits:
cpu: 1000m
memory: 2Gi
requests:
cpu: 200m
memory: 512Mi
volumes:
- name: data
persistentVolumeClaim:
claimName: paperclip-data