Configuration
Everything you need to customise the dev-bookstack environment â from database credentials to resource limits and persistent storage.
Database & Application Credentials
All secrets live in openshift/secrets.yaml. The file uses stringData,
so values are stored as plain text in the manifest â do not commit real
credentials to version control.
openshift/secrets.yaml are for local development only. Always rotate them before connecting to any shared or internet-facing environment.
MariaDB secret (mariadb-secret)
| Key | Default value | Description |
|---|---|---|
root-password | devroot | MariaDB root password |
database | bookstack | Database name |
username | bookstack | Application DB user |
password | devpassword | Application DB password |
BookStack secret (bookstack-secret)
| Key | Description |
|---|---|
app-key | Laravel application encryption key â format: base64:<44-char-base64> |
mail-password | SMTP password (empty by default â mail is logged, not sent) |
To change any credential, edit openshift/secrets.yaml before running deploy.sh. If the environment is already running, delete and re-create the secret:
oc delete secret mariadb-secret -n bookstack-dev
oc apply -f openshift/secrets.yaml
Generating a New APP_KEY
BookStack (Laravel) requires a unique 256-bit base64-encoded encryption key. The one shipped
in secrets.yaml is for bootstrapping only. Generate a fresh one with:
# Generate a new key (requires openssl)
echo "base64:$(openssl rand -base64 32)"
Paste the result as the value of app-key in openshift/secrets.yaml.
Changing APP_URL
By default, BookStack is exposed at:
http://bookstack-bookstack-dev.apps-crc.testing
If your CRC cluster uses a different wildcard domain, update two places in
openshift/bookstack.yaml:
| Location | Field | Example value |
|---|---|---|
| Deployment env var | APP_URL |
http://bookstack-bookstack-dev.apps-crc.testing |
| Route spec | spec.host |
bookstack-bookstack-dev.apps-crc.testing |
crc console --credentials to print your cluster domain if you're unsure what it is.
After editing, re-apply the manifest:
oc apply -f openshift/bookstack.yaml
Persistent Storage
Both services use PersistentVolumeClaims backed by CRC's default storage class (ReadWriteOnce):
| PVC name | Mount path | Default size | Contents |
|---|---|---|---|
mariadb-pvc |
/var/lib/mysql |
2 Gi | All BookStack database data |
bookstack-uploads-pvc |
/config |
5 Gi | Uploaded files, images, and BookStack config |
Data survives pod restarts and redeployments. It is permanently removed when you run ./teardown.sh, which deletes the entire namespace.
Resizing a PVC
Edit the storage field in the relevant YAML file, then re-apply. CRC's storage class supports online expansion for ReadWriteOnce volumes:
spec:
resources:
requests:
storage: 5Gi # â increase as needed
Resource Limits
BookStack
| CPU | Memory | |
|---|---|---|
| Request | 200m | 256 Mi |
| Limit | 1000m (1 core) | 512 Mi |
MariaDB
| CPU | Memory | |
|---|---|---|
| Request | 100m | 256 Mi |
| Limit | 500m | 512 Mi |
Health probes
Both deployments include readiness and liveness probes. BookStack's readiness probe checks GET /login with a 60-second initial delay (PHP startup) and retries every 15 seconds.
BookStack Environment Variables
These are injected into the BookStack container via the Deployment manifest in openshift/bookstack.yaml:
| Variable | Value / Source | Notes |
|---|---|---|
PUID / PGID | 1000 | Linux user/group for the linuxserver image |
TZ | UTC | Timezone |
APP_URL | Hard-coded in YAML | Must match the Route host |
APP_KEY | bookstack-secret | Laravel encryption key |
DB_HOST | mariadb.bookstack-dev.svc.cluster.local | In-cluster DNS for MariaDB Service |
DB_PORT | 3306 | |
DB_DATABASE | mariadb-secret | From Secret key database |
DB_USERNAME | mariadb-secret | From Secret key username |
DB_PASSWORD | mariadb-secret | From Secret key password |
MAIL_DRIVER | log | Emails are written to the log â not sent |
REGISTRATION_ENABLED | true | Allows self-registration in dev |
linuxserver/bookstack image runs as root internally. deploy.sh grants the anyuid SCC to the default service account in the bookstack-dev namespace to allow this. MariaDB uses bitnami/mariadb, which is already arbitrary-UID compatible.