Adds bookstack app.
This commit is contained in:
5
bookstack/app.yaml
Normal file
5
bookstack/app.yaml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
name: bookstack
|
||||||
|
is: bookstack
|
||||||
|
description: BookStack is a simple, self-hosted, easy-to-use platform for organising and storing information.
|
||||||
|
icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/bookstack.svg
|
||||||
|
latest: "26"
|
||||||
39
bookstack/versions/26/README.md
Normal file
39
bookstack/versions/26/README.md
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# BookStack
|
||||||
|
|
||||||
|
BookStack is a simple, self-hosted platform for organising and storing information in a hierarchical structure of Books, Chapters, and Pages.
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
- **MySQL** - Database for storing content and users
|
||||||
|
- **SMTP** - For email notifications and password resets
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
Key settings in `config.yaml`:
|
||||||
|
|
||||||
|
- **domain** - Where BookStack will be accessible
|
||||||
|
- **storage** - Persistent volume size (default: `2Gi`)
|
||||||
|
- **db.name** - Database name (default: `bookstack`)
|
||||||
|
- **smtp** - Email settings inherited from your Wild Cloud SMTP service
|
||||||
|
|
||||||
|
## First-Time Setup
|
||||||
|
|
||||||
|
1. Add and deploy the app:
|
||||||
|
```bash
|
||||||
|
wild app add bookstack
|
||||||
|
wild app deploy bookstack
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Log in with the default admin credentials:
|
||||||
|
- **Email**: `admin@admin.com`
|
||||||
|
- **Password**: `password`
|
||||||
|
|
||||||
|
3. **Immediately change the admin email and password** via **Settings → Your Profile**.
|
||||||
|
|
||||||
|
4. Start creating Books, Chapters, and Pages from the dashboard.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- BookStack uses the linuxserver.io image which runs as root internally — this is expected and required for the image to function
|
||||||
|
- SMTP settings are configured via the `smtp` section in your config
|
||||||
|
- The `appKey` secret is auto-generated and used for encrypting data — do not change it after content has been created
|
||||||
64
bookstack/versions/26/db-init-job.yaml
Normal file
64
bookstack/versions/26/db-init-job.yaml
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
apiVersion: batch/v1
|
||||||
|
kind: Job
|
||||||
|
metadata:
|
||||||
|
name: bookstack-db-init
|
||||||
|
labels:
|
||||||
|
component: db-init
|
||||||
|
spec:
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
component: db-init
|
||||||
|
spec:
|
||||||
|
restartPolicy: OnFailure
|
||||||
|
securityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 999
|
||||||
|
runAsGroup: 999
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
containers:
|
||||||
|
- name: mysql-init
|
||||||
|
image: mysql:9.1.0
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
readOnlyRootFilesystem: false
|
||||||
|
env:
|
||||||
|
- name: MYSQL_ROOT_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: bookstack-secrets
|
||||||
|
key: mysql.rootPassword
|
||||||
|
- name: DB_HOSTNAME
|
||||||
|
value: {{ .db.host }}
|
||||||
|
- name: DB_PORT
|
||||||
|
value: "{{ .db.port }}"
|
||||||
|
- name: DB_DATABASE_NAME
|
||||||
|
value: {{ .db.name }}
|
||||||
|
- name: DB_USERNAME
|
||||||
|
value: {{ .db.user }}
|
||||||
|
- name: DB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: bookstack-secrets
|
||||||
|
key: dbPassword
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
set -e
|
||||||
|
until mysql -h ${DB_HOSTNAME} -P ${DB_PORT} -u root -p${MYSQL_ROOT_PASSWORD} -e "SELECT 1" 2>/dev/null; do
|
||||||
|
echo "Waiting for MySQL..."
|
||||||
|
sleep 2
|
||||||
|
done
|
||||||
|
mysql -h ${DB_HOSTNAME} -P ${DB_PORT} -u root -p${MYSQL_ROOT_PASSWORD} <<EOF
|
||||||
|
CREATE DATABASE IF NOT EXISTS ${DB_DATABASE_NAME} CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
CREATE USER IF NOT EXISTS '${DB_USERNAME}'@'%' IDENTIFIED BY '${DB_PASSWORD}';
|
||||||
|
ALTER USER '${DB_USERNAME}'@'%' IDENTIFIED BY '${DB_PASSWORD}';
|
||||||
|
GRANT ALL PRIVILEGES ON ${DB_DATABASE_NAME}.* TO '${DB_USERNAME}'@'%';
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
EOF
|
||||||
|
echo "Done"
|
||||||
106
bookstack/versions/26/deployment.yaml
Normal file
106
bookstack/versions/26/deployment.yaml
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: bookstack
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
component: web
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
component: web
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsNonRoot: false
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
containers:
|
||||||
|
- name: bookstack
|
||||||
|
image: lscr.io/linuxserver/bookstack:26.05.1
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
containerPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
env:
|
||||||
|
- name: PUID
|
||||||
|
value: "1000"
|
||||||
|
- name: PGID
|
||||||
|
value: "1000"
|
||||||
|
- name: APP_URL
|
||||||
|
value: https://{{ .domain }}
|
||||||
|
- name: DB_HOST
|
||||||
|
value: {{ .db.host }}
|
||||||
|
- name: DB_PORT
|
||||||
|
value: "{{ .db.port }}"
|
||||||
|
- name: DB_DATABASE
|
||||||
|
value: {{ .db.name }}
|
||||||
|
- name: DB_USERNAME
|
||||||
|
value: {{ .db.user }}
|
||||||
|
- name: DB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: bookstack-secrets
|
||||||
|
key: dbPassword
|
||||||
|
- name: APP_KEY
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: bookstack-secrets
|
||||||
|
key: appKey
|
||||||
|
- name: MAIL_DRIVER
|
||||||
|
value: smtp
|
||||||
|
- name: MAIL_HOST
|
||||||
|
value: {{ .smtp.host }}
|
||||||
|
- name: MAIL_PORT
|
||||||
|
value: "{{ .smtp.port }}"
|
||||||
|
- name: MAIL_FROM
|
||||||
|
value: {{ .smtp.from }}
|
||||||
|
- name: MAIL_USERNAME
|
||||||
|
value: {{ .smtp.user }}
|
||||||
|
- name: MAIL_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: bookstack-secrets
|
||||||
|
key: smtpPassword
|
||||||
|
- name: MAIL_ENCRYPTION
|
||||||
|
value: tls
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "1"
|
||||||
|
ephemeral-storage: 1Gi
|
||||||
|
memory: 512Mi
|
||||||
|
requests:
|
||||||
|
cpu: 50m
|
||||||
|
ephemeral-storage: 50Mi
|
||||||
|
memory: 128Mi
|
||||||
|
volumeMounts:
|
||||||
|
- name: bookstack-data
|
||||||
|
mountPath: /config
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: 80
|
||||||
|
initialDelaySeconds: 90
|
||||||
|
timeoutSeconds: 5
|
||||||
|
periodSeconds: 15
|
||||||
|
failureThreshold: 6
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /
|
||||||
|
port: 80
|
||||||
|
initialDelaySeconds: 60
|
||||||
|
timeoutSeconds: 3
|
||||||
|
periodSeconds: 10
|
||||||
|
failureThreshold: 3
|
||||||
|
securityContext:
|
||||||
|
readOnlyRootFilesystem: false
|
||||||
|
volumes:
|
||||||
|
- name: bookstack-data
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: bookstack-data
|
||||||
|
restartPolicy: Always
|
||||||
26
bookstack/versions/26/ingress.yaml
Normal file
26
bookstack/versions/26/ingress.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: bookstack
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
annotations:
|
||||||
|
external-dns.alpha.kubernetes.io/target: {{ .externalDnsDomain }}
|
||||||
|
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
|
||||||
|
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||||
|
spec:
|
||||||
|
ingressClassName: traefik
|
||||||
|
rules:
|
||||||
|
- host: {{ .domain }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: bookstack
|
||||||
|
port:
|
||||||
|
number: 80
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- {{ .domain }}
|
||||||
|
secretName: {{ .tlsSecretName }}
|
||||||
16
bookstack/versions/26/kustomization.yaml
Normal file
16
bookstack/versions/26/kustomization.yaml
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
labels:
|
||||||
|
- includeSelectors: true
|
||||||
|
pairs:
|
||||||
|
app: bookstack
|
||||||
|
managedBy: kustomize
|
||||||
|
partOf: wild-cloud
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- db-init-job.yaml
|
||||||
|
- deployment.yaml
|
||||||
|
- service.yaml
|
||||||
|
- ingress.yaml
|
||||||
|
- pvc.yaml
|
||||||
26
bookstack/versions/26/manifest.yaml
Normal file
26
bookstack/versions/26/manifest.yaml
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
version: 26.05.1-2
|
||||||
|
requires:
|
||||||
|
- name: mysql
|
||||||
|
- name: smtp
|
||||||
|
defaultConfig:
|
||||||
|
namespace: bookstack
|
||||||
|
externalDnsDomain: '{{ .cloud.domain }}'
|
||||||
|
domain: bookstack.{{ .cloud.domain }}
|
||||||
|
tlsSecretName: wildcard-wild-cloud-tls
|
||||||
|
storage: 2Gi
|
||||||
|
db:
|
||||||
|
host: '{{ .apps.mysql.host }}'
|
||||||
|
port: '3306'
|
||||||
|
name: bookstack
|
||||||
|
user: bookstack
|
||||||
|
smtp:
|
||||||
|
host: '{{ .apps.smtp.host }}'
|
||||||
|
port: '{{ .apps.smtp.port }}'
|
||||||
|
from: '{{ .apps.smtp.from }}'
|
||||||
|
user: '{{ .apps.smtp.user }}'
|
||||||
|
defaultSecrets:
|
||||||
|
- key: appKey
|
||||||
|
- key: dbPassword
|
||||||
|
- key: smtpPassword
|
||||||
|
requiredSecrets:
|
||||||
|
- mysql.rootPassword
|
||||||
4
bookstack/versions/26/namespace.yaml
Normal file
4
bookstack/versions/26/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: {{ .namespace }}
|
||||||
11
bookstack/versions/26/pvc.yaml
Normal file
11
bookstack/versions/26/pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: bookstack-data
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: {{ .storage }}
|
||||||
13
bookstack/versions/26/service.yaml
Normal file
13
bookstack/versions/26/service.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: bookstack
|
||||||
|
namespace: {{ .namespace }}
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
component: web
|
||||||
|
ports:
|
||||||
|
- name: http
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
||||||
|
protocol: TCP
|
||||||
Reference in New Issue
Block a user