Add BookStack documentation app
This commit is contained in:
@@ -0,0 +1,84 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: bookstack-app
|
||||
namespace: bookstack
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: bookstack
|
||||
namespace: bookstack
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: bookstack
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: bookstack
|
||||
spec:
|
||||
containers:
|
||||
- name: bookstack
|
||||
image: lscr.io/linuxserver/bookstack:latest
|
||||
ports:
|
||||
- containerPort: 80
|
||||
env:
|
||||
- name: PUID
|
||||
value: "1000"
|
||||
- name: PGID
|
||||
value: "1000"
|
||||
- name: TZ
|
||||
value: "America/Indiana/Indianapolis"
|
||||
- name: APP_URL
|
||||
value: "http://docs.home.lan"
|
||||
- name: APP_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: bookstack-secret
|
||||
key: APP_KEY
|
||||
- name: DB_HOST
|
||||
value: "bookstack-db"
|
||||
- name: DB_PORT
|
||||
value: "3306"
|
||||
- name: DB_DATABASE
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: bookstack-secret
|
||||
key: MYSQL_DATABASE
|
||||
- name: DB_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: bookstack-secret
|
||||
key: MYSQL_USER
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: bookstack-secret
|
||||
key: MYSQL_PASSWORD
|
||||
volumeMounts:
|
||||
- name: app-data
|
||||
mountPath: /config
|
||||
volumes:
|
||||
- name: app-data
|
||||
persistentVolumeClaim:
|
||||
claimName: bookstack-app
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: bookstack
|
||||
namespace: bookstack
|
||||
spec:
|
||||
selector:
|
||||
app: bookstack
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: bookstack
|
||||
namespace: bookstack
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: docs.home.lan
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: bookstack
|
||||
port:
|
||||
number: 80
|
||||
@@ -0,0 +1,8 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- secret.yaml
|
||||
- mariadb.yaml
|
||||
- bookstack.yaml
|
||||
- ingress.yaml
|
||||
@@ -0,0 +1,54 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: bookstack-db
|
||||
namespace: bookstack
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: bookstack-db
|
||||
namespace: bookstack
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: bookstack-db
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: bookstack-db
|
||||
spec:
|
||||
containers:
|
||||
- name: mariadb
|
||||
image: mariadb:11
|
||||
envFrom:
|
||||
- secretRef:
|
||||
name: bookstack-secret
|
||||
ports:
|
||||
- containerPort: 3306
|
||||
volumeMounts:
|
||||
- name: db-data
|
||||
mountPath: /var/lib/mysql
|
||||
volumes:
|
||||
- name: db-data
|
||||
persistentVolumeClaim:
|
||||
claimName: bookstack-db
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: bookstack-db
|
||||
namespace: bookstack
|
||||
spec:
|
||||
selector:
|
||||
app: bookstack-db
|
||||
ports:
|
||||
- port: 3306
|
||||
targetPort: 3306
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: bookstack
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: bookstack-secret
|
||||
namespace: bookstack
|
||||
type: Opaque
|
||||
stringData:
|
||||
MYSQL_ROOT_PASSWORD: "ChangeMeRootPassword"
|
||||
MYSQL_DATABASE: "bookstack"
|
||||
MYSQL_USER: "bookstack"
|
||||
MYSQL_PASSWORD: "ChangeMeBookstackPassword"
|
||||
APP_KEY: "base64:QUUcXvExMqKP6tIw9+TcEjpDxPJIZMX2k0AAbELHtPw="
|
||||
Reference in New Issue
Block a user