This commit is contained in:
Sebastian Schüler 2025-10-25 23:47:08 +02:00
commit 2a8f2384bc
20 changed files with 491 additions and 0 deletions

0
README.md Normal file
View File

View File

@ -0,0 +1,31 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: drawio
spec:
replicas: 1
selector:
matchLabels:
app: drawio
template:
metadata:
labels:
app: drawio
spec:
containers:
- name: drawio
image: docker.io/jgraph/drawio
ports:
- containerPort: 8080
env:
- name: DRAWIO_BASE_URL
value: "/"
- name: DRAWIO_DEFAULT_THEME
value: "kennedy"
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"

12
apps/drawio/service.yaml Normal file
View File

@ -0,0 +1,12 @@
apiVersion: v1
kind: Service
metadata:
name: drawio
spec:
type: NodePort
selector:
app: drawio
ports:
- port: 8080
targetPort: 8080
nodePort: 30880

44
apps/gitea/db.yaml Normal file
View File

@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea-db
spec:
replicas: 1
selector:
matchLabels:
app: gitea-db
template:
metadata:
labels:
app: gitea-db
spec:
containers:
- name: postgres
image: postgres:15
env:
- name: POSTGRES_USER
value: gitea
- name: POSTGRES_PASSWORD
value: giteapass
- name: POSTGRES_DB
value: gitea
ports:
- containerPort: 5432
volumeMounts:
- name: db-storage
mountPath: /var/lib/postgresql/data
volumes:
- name: db-storage
persistentVolumeClaim:
claimName: gitea-db-pvc
---
apiVersion: v1
kind: Service
metadata:
name: gitea-db
spec:
selector:
app: gitea-db
ports:
- port: 5432
targetPort: 5432

71
apps/gitea/gitea.yaml Normal file
View File

@ -0,0 +1,71 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: gitea
spec:
replicas: 1
selector:
matchLabels:
app: gitea
template:
metadata:
labels:
app: gitea
spec:
containers:
- name: gitea
image: gitea/gitea:1.22.3
ports:
- containerPort: 3000 # Web Ui
- containerPort: 22 # SSH
env:
- name: USER_UID
value: "1000"
- name: USER_GID
value: "1000"
- name: GITEA__database__DB_TYPE
value: postgres
- name: GITEA__database__HOST
value: gitea-db:5432
- name: GITEA__database__NAME
value: gitea
- name: GITEA__database__USER
value: gitea
- name: GITEA__database__PASSWD
value: giteapass
- name: GITEA__server__DOMAIN
value: "raspberrypi.local"
- name: GITEA__server__ROOT_URL
value: "http://raspberrypi.local:30081/"
volumeMounts:
- name: gitea-data
mountPath: /data
resources:
requests:
memory: "256Mi"
cpu: "200m"
limits:
memory: "1Gi"
cpu: "500m"
volumes:
- name: gitea-data
persistentVolumeClaim:
claimName: gitea-data-pvc
---
apiVersion: v1
kind: Service
metadata:
name: gitea
spec:
type: NodePort
selector:
app: gitea
ports:
- name: web
port: 3000
targetPort: 3000
nodePort: 30081
- name: ssh
port: 22
targetPort: 22
nodePort: 30222

21
apps/gitea/pvc.yaml Normal file
View File

@ -0,0 +1,21 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitea-data-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 15Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: gitea-db-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

45
apps/paperless/db.yaml Normal file
View File

@ -0,0 +1,45 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: paperless-db
spec:
replicas: 1
selector:
matchLabels:
app: paperless-db
template:
metadata:
labels:
app: paperless-db
spec:
containers:
- name: postgres
image: postgres:15
env:
- name: POSTGRES_USER
value: paperless
- name: POSTGRES_PASSWORD
value: paperlesspass
- name: POSTGRES_DB
value: paperless
ports:
- containerPort: 5432
volumeMounts:
- name: db-storage
mountPath: /var/lib/postgresql/data
volumes:
- name: db-storage
persistentVolumeClaim:
claimName: paperless-db-pvc
---
apiVersion: v1
kind: Service
metadata:
name: paperless-db
spec:
selector:
app: paperless-db
ports:
- port: 5432
targetPort: 5432

View File

@ -0,0 +1,55 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: paperless
spec:
replicas: 1
selector:
matchLabels:
app: paperless
template:
metadata:
labels:
app: paperless
spec:
containers:
- name: paperless
image: ghcr.io/paperless-ngx/paperless-ngx:latest
env:
- name: PAPERLESS_DBHOST
value: paperless-db
- name: PAPERLESS_DBUSER
value: paperless
- name: PAPERLESS_DBPASS
value: paperlesspass
- name: PAPERLESS_DBNAME
value: paperless
- name: PAPERLESS_REDIS
value: redis://redis:6379
- name: PAPERLESS_PORT
value: "8000"
- name: PAPERLESS_CONSUMER_WORKERS
value: "2"
ports:
- containerPort: 8000
volumeMounts:
- name: paperless-data
mountPath: /usr/src/paperless/data
volumes:
- name: paperless-data
persistentVolumeClaim:
claimName: paperless-data-pvc
---
apiVersion: v1
kind: Service
metadata:
name: paperless
spec:
type: NodePort
selector:
app: paperless
ports:
- port: 8000
targetPort: 8000
nodePort: 30080

21
apps/paperless/pvc.yaml Normal file
View File

@ -0,0 +1,21 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: paperless-data-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 25Gi
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: paperless-db-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

1
apps/paperless/readme.md Normal file
View File

@ -0,0 +1 @@
- http://<pi-ip>:30080

30
apps/paperless/redis.yaml Normal file
View File

@ -0,0 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis:7-alpine
ports:
- containerPort: 6379
---
apiVersion: v1
kind: Service
metadata:
name: redis
spec:
selector:
app: redis
ports:
- port: 6379
targetPort: 6379

View File

@ -0,0 +1,39 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: rabbitmq
spec:
replicas: 1
selector:
matchLabels:
app: rabbitmq
template:
metadata:
labels:
app: rabbitmq
spec:
containers:
- name: rabbitmq
image: rabbitmq:3.13-management
ports:
- name: amqp
containerPort: 5672
- name: mqtt
containerPort: 1883
- name: management
containerPort: 15672
envFrom:
- secretRef:
name: rabbitmq-secret
volumeMounts:
- name: rabbitmq-data
mountPath: /var/lib/rabbitmq
command: ["/bin/bash", "-c"]
args:
- |
rabbitmq-plugins enable --offline rabbitmq_management rabbitmq_mqtt;
rabbitmq-server
volumes:
- name: rabbitmq-data
persistentVolumeClaim:
claimName: rabbitmq-data-pvc

10
apps/rabbitmq/pvc.yaml Normal file
View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: rabbitmq-data-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi

View File

@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: rabbitmq-secret
type: Opaque
stringData:
RABBITMQ_DEFAULT_USER: admin
RABBITMQ_DEFAULT_PASS: supersecret

View File

@ -0,0 +1,28 @@
apiVersion: v1
kind: Service
metadata:
name: rabbitmq
spec:
selector:
app: rabbitmq
ports:
- name: amqp
port: 5672
targetPort: 5672
- name: mqtt
port: 1883
targetPort: 1883
---
apiVersion: v1
kind: Service
metadata:
name: rabbitmq-management
spec:
type: NodePort
selector:
app: rabbitmq
ports:
- name: management
port: 15672
targetPort: 15672
nodePort: 31672

3
apps/syncthing/README.md Normal file
View File

@ -0,0 +1,3 @@
- Web UI -> http://<pi-ip>:30884
- Sync protocol --> 22000
- Discovery (UDP) --> 21027

View File

@ -0,0 +1,36 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: syncthing
spec:
replicas: 1
selector:
matchLabels:
app: syncthing
template:
metadata:
labels:
app: syncthing
spec:
containers:
- name: syncthing
image: syncthing/syncthing:latest
ports:
- containerPort: 8384 #WebUi
- containerPort: 22000 #Sync protocol (TCP)
- containerPort: 21027 #Discovery (UDP)
protocol: UDP
volumeMounts:
- name: syncthing-data
mountPath: /var/syncthing
resources:
requests:
memory: "128Mi"
cpu: "100m"
limits:
memory: "512Mi"
cpu: "500m"
volumes:
- name: syncthing-data
persistentVolumeClaim:
claimName: syncthing-pvc

10
apps/syncthing/pvc.yaml Normal file
View File

@ -0,0 +1,10 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: syncthing-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 30Gi

View File

@ -0,0 +1,21 @@
apiVersion: v1
kind: Service
metadata:
name: syncthing
spec:
type: NodePort
selector:
app: syncthing
ports:
- name: web
port: 8384
targetPort: 8384
nodePort: 30884
- name: sync
port: 22000
targetPort: 22000
nodePort: 32000
- name: discovery
port: 21027
targetPort: 21027
protocol: UDP

5
storage/HOW_TO_BACKUP.md Normal file
View File

@ -0,0 +1,5 @@
sudo rsync -avh /var/lib/rancher/k3s/storage/ /media/pi/backup-drive/k3s-storage/
or
sudo rsync -avh --delete /var/lib/rancher/k3s/storage/ /mnt/backup/k3s-storage/
then install k3s curl on new device, copy the folder over, "kubectl apply -f this_root_dir" and done