Files

95 lines
3.0 KiB
YAML
Raw Permalink Normal View History

2026-08-12 12:46:58 -07:00
# Dashwise all-in-one: the container runs the web/API server (3000), a bundled
# PocketBase (8090) and valkey, all on localhost inside the pod.
#
# Only 3000 is exposed. The browser never talks to PocketBase directly -- the
# frontend resolves its backend as window.location.origin and every
# PocketBase call is made server-side -- so 8090 stays internal.
#
# NOTE: :latest and :stable are built for amd64 ONLY and will not run on this
# arm64 cluster. Use a tag that publishes an arm64 manifest.
apiVersion: apps/v1
kind: Deployment
metadata:
name: dashwise
namespace: dashwise
labels:
app.kubernetes.io/name: dashwise
spec:
replicas: 1
revisionHistoryLimit: 3
strategy:
# the PV is ReadWriteOnce and PocketBase is a single-writer SQLite store,
# so the old pod has to go before the new one starts
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: dashwise
template:
metadata:
labels:
app.kubernetes.io/name: dashwise
spec:
containers:
- name: dashwise
image: andreasmolnardev/dashwise:v1.0-rc1
imagePullPolicy: IfNotPresent
env:
- name: ENVIRONMENT
value: production
- name: INSTANCE_NAME
value: Witty One Off
- name: START_POCKETBASE
value: "true"
- name: PB_BINARY_PATH
value: /usr/local/bin/pocketbase
# in-pod addresses: the server talks to PocketBase over localhost
- name: PB_URL
value: http://127.0.0.1:8090
- name: NEXT_PUBLIC_PB_URL
value: http://127.0.0.1:8090
- name: APP_BASE_URL
value: https://home.wittyoneoff.com
- name: NEXT_PUBLIC_APP_URL
value: https://home.wittyoneoff.com
- name: PB_ADMIN_EMAIL
valueFrom:
secretKeyRef:
name: dashwise
key: pb-admin-email
- name: PB_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: dashwise
key: pb-admin-password
- name: TZ
value: America/Los_Angeles
ports:
- name: http
containerPort: 3000
protocol: TCP
- name: pocketbase
containerPort: 8090
protocol: TCP
startupProbe:
tcpSocket:
port: http
failureThreshold: 60
periodSeconds: 5
readinessProbe:
tcpSocket:
port: http
periodSeconds: 10
failureThreshold: 3
livenessProbe:
tcpSocket:
port: http
periodSeconds: 20
failureThreshold: 3
volumeMounts:
- name: data
mountPath: /app/pocketbase/pb_data
volumes:
- name: data
persistentVolumeClaim:
claimName: dashwise