Adds bookwyrm app.

This commit is contained in:
2026-06-19 21:32:56 +00:00
parent 78ac8d0cbb
commit 7b41ed5148
11 changed files with 493 additions and 0 deletions

View File

@@ -0,0 +1,149 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: bookwyrm
namespace: bookwyrm
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
component: web
template:
metadata:
labels:
component: web
spec:
securityContext:
runAsNonRoot: false
runAsUser: 0
seccompProfile:
type: RuntimeDefault
containers:
- name: bookwyrm
image: ghcr.io/bookwyrm-social/bookwyrm:v0.8.6
command: ["gunicorn", "bookwyrm.wsgi:application"]
ports:
- name: http
containerPort: 8000
protocol: TCP
env:
- name: SECRET_KEY
valueFrom:
secretKeyRef:
name: bookwyrm-secrets
key: secretKey
- name: DEBUG
value: "false"
- name: DOMAIN
value: {{ .domain }}
- name: ALLOWED_HOSTS
value: {{ .domain }}
- name: EMAIL
value: {{ .smtp.from }}
- name: POSTGRES_HOST
value: {{ .db.host }}
- name: PGPORT
value: "{{ .db.port }}"
- name: POSTGRES_DB
value: {{ .db.name }}
- name: POSTGRES_USER
value: {{ .db.user }}
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: bookwyrm-secrets
key: dbPassword
- name: REDIS_ACTIVITY_HOST
value: {{ .redis.host }}
- name: REDIS_ACTIVITY_PORT
value: "6379"
- name: REDIS_ACTIVITY_PASSWORD
valueFrom:
secretKeyRef:
name: bookwyrm-secrets
key: redis.password
- name: REDIS_ACTIVITY_URL
value: redis://:$(REDIS_ACTIVITY_PASSWORD)@{{ .redis.host }}:6379/0
- name: REDIS_BROKER_HOST
value: {{ .redis.host }}
- name: REDIS_BROKER_PORT
value: "6379"
- name: REDIS_BROKER_PASSWORD
valueFrom:
secretKeyRef:
name: bookwyrm-secrets
key: redis.password
- name: REDIS_BROKER_URL
value: redis://:$(REDIS_BROKER_PASSWORD)@{{ .redis.host }}:6379/1
- name: EMAIL_HOST
value: {{ .smtp.host }}
- name: EMAIL_PORT
value: "{{ .smtp.port }}"
- name: EMAIL_HOST_USER
value: {{ .smtp.user }}
- name: EMAIL_HOST_PASSWORD
valueFrom:
secretKeyRef:
name: bookwyrm-secrets
key: smtpPassword
- name: EMAIL_USE_TLS
value: "true"
- name: EMAIL_USE_SSL
value: "false"
- name: EMAIL_SENDER_NAME
value: BookWyrm
- name: EMAIL_SENDER_DOMAIN
value: {{ .domain }}
- name: MEDIA_ROOT
value: /app/images
- name: STATIC_ROOT
value: /app/static
- name: ENABLE_THUMBNAIL_GENERATION
value: "true"
resources:
limits:
cpu: 1000m
ephemeral-storage: 2Gi
memory: 1Gi
requests:
cpu: 50m
ephemeral-storage: 50Mi
memory: 256Mi
volumeMounts:
- name: bookwyrm-images
mountPath: /app/images
- name: bookwyrm-static
mountPath: /app/static
- name: bookwyrm-exports
mountPath: /app/exports
livenessProbe:
tcpSocket:
port: 8000
initialDelaySeconds: 120
timeoutSeconds: 10
periodSeconds: 30
failureThreshold: 6
readinessProbe:
tcpSocket:
port: 8000
initialDelaySeconds: 60
timeoutSeconds: 5
periodSeconds: 15
failureThreshold: 3
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false
volumes:
- name: bookwyrm-images
persistentVolumeClaim:
claimName: bookwyrm-images
- name: bookwyrm-static
emptyDir: {}
- name: bookwyrm-exports
emptyDir: {}
restartPolicy: Always