Tanguy Herbron
fc36d7104b
When loading Vaultwarden on the cluster, it has been judged to be better to have DB files locally, on top of the longhorn backup. This makes data persistency much easier on the long term.
42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: vaultwarden
|
|
namespace: vaultwarden
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: vaultwarden
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: vaultwarden
|
|
spec:
|
|
hostname: vaultwarden
|
|
subdomain: vaultwarden
|
|
containers:
|
|
- name: vaultwarden
|
|
image: vaultwarden/server
|
|
ports:
|
|
- containerPort: 80
|
|
env:
|
|
- name: SIGNUPS_ALLOWED
|
|
value: "true"
|
|
- name: DATABASE_URL
|
|
value: "mysql://root:example@127.0.0.1:3306/vaultwarden"
|
|
- name: mariadb
|
|
image: mariadb
|
|
env:
|
|
- name: MARIADB_ROOT_PASSWORD
|
|
value: "example"
|
|
- name: MARIADB_DATABASE
|
|
value: "vaultwarden"
|
|
volumeMounts:
|
|
- mountPath: "/var/lib/mysql"
|
|
name: vaultwarden-pv
|
|
volumes:
|
|
- name: vaultwarden-pv
|
|
hostPath:
|
|
path: "/mnt/vaultwarden"
|