Kubernetes
Share Me can be deployed to Kubernetes using its Docker images. Since PocketBase uses SQLite, it should be deployed as a StatefulSet
or only one replica should be made:
apiVersion: v1kind: PersistentVolumeClaimmetadata:name: share-me-dataspec:resources:requests:storage: 10GivolumeMode: FilesystemaccessModes:- ReadWriteOncestorageClassName: local-path---apiVersion: apps/v1kind: Deploymentmetadata:name: share-me-frontendspec:selector:matchLabels:app.kubernetes.io/name: share-me-frontendapp.kubernetes.io/instance: share-metemplate:metadata:labels:app.kubernetes.io/name: share-me-frontendapp.kubernetes.io/instance: share-mespec:containers:- name: share-me-frontendimage: ghcr.io/dan6erbond/share-me-frontendimagePullPolicy: Alwaysresources:requests:memory: "64Mi"cpu: "250m"limits:memory: "512Mi"cpu: "1"ports:- containerPort: 3000env:- name: POCKETBASE_URLvalue: https://shareme.example.com---apiVersion: apps/v1kind: Deploymentmetadata:name: share-me-serverspec:selector:matchLabels:app.kubernetes.io/name: share-me-serverapp.kubernetes.io/instance: share-metemplate:metadata:labels:app.kubernetes.io/name: share-me-serverapp.kubernetes.io/instance: share-mespec:containers:- name: share-me-frontendimage: ghcr.io/dan6erbond/share-me-serverimagePullPolicy: Alwaysresources:requests:memory: "64Mi"cpu: "250m"limits:memory: "512Mi"cpu: "1"ports:- containerPort: 8080volumeMounts:- mountPath: /pb/pb_dataname: datavolumes:- name: datapersistentVolumeClaim:claimName: share-me-data---apiVersion: v1kind: Servicemetadata:name: share-me-frontendspec:selector:app.kubernetes.io/name: share-me-frontendapp.kubernetes.io/instance: share-meports:- port: 3000name: http---apiVersion: v1kind: Servicemetadata:name: share-me-serverspec:selector:app.kubernetes.io/name: share-me-serverapp.kubernetes.io/instance: share-meports:- port: 8080name: http---apiVersion: networking.k8s.io/v1kind: Ingressmetadata:annotations:traefik.ingress.kubernetes.io/router.entrypoints: websecuretraefik.ingress.kubernetes.io/router.tls.certresolver: letsencryptname: share-mespec:rules:- host: shareme.example.comhttp:paths:- backend:service:name: share-me-frontendport:name: httppath: /pathType: Prefix- backend:service:name: share-me-frontendport:name: httppath: /_nextpathType: Prefix- backend:service:name: share-me-serverport:name: httppath: /apipathType: Prefix- backend:service:name: share-me-serverport:name: httppath: /_pathType: Prefix
Configure the Ingress for your selected reverse proxy.