BookStack mit einem Klick auf Pethost deployen
Ein Wiki aus Regalen, Büchern, Kapiteln und Seiten
Was passiert
- Du meldest dich bei Pethost an oder legst ein Konto an, mit Passkey, GitHub oder Google.
- Noch keine Maschine? Du wählst einen Tarif, und wir bereiten eine für dich vor. Der Link wartet in deinem Browser, bis sie bereit ist.
- „Neues Projekt“ öffnet sich bei der App. Du füllst aus, was sie braucht, und klickst auf „Projekt erstellen“: E-Mail, Admin-Passwort.
- In ein, zwei Minuten läuft die App unter eigener Adresse mit HTTPS. Ihre Secrets werden zufällig für sie erzeugt, und ihre Daten sind im nächtlichen Backup.
- Sie ist ein Projekt wie jedes andere: compose.yaml, .env, Logs und ein Terminal findest du im Panel, und dein Agent kann sie ändern, zurückrollen oder wiederherstellen.
Erste Schritte
Melde dich mit der angegebenen E-Mail und dem Admin-Passwort an, mindestens 8 Zeichen: Die Vorlage gibt sie dem ersten Admin von BookStack, sodass sich das voreingestellte [email protected] nie anmeldet. Uploads und Einstellungen bleiben in /config erhalten.
Was läuft
Die Vorlage ist diese compose.yaml und die Variablen, die sie in die .env des Projekts schreibt. Pethost führt die Datei so aus, wie sie geschrieben ist.
services:
bookstack:
image: lscr.io/linuxserver/bookstack:v26.09.1-ls288
restart: unless-stopped
environment:
PUID: "1000"
PGID: "1000"
APP_URL: ${URL}
APP_KEY: ${APP_KEY}
DB_HOST: mariadb
DB_PORT: "3306"
DB_DATABASE: bookstack
DB_USERNAME: bookstack
DB_PASSWORD: ${DB_PASSWORD}
ADMIN_EMAIL: ${ADMIN_EMAIL}
ADMIN_PASSWORD: ${ADMIN_PASSWORD}
# BookStack's migrations make [email protected] with the password "password". A script of the
# image's custom-init step, which runs after the migrations and before the web server starts,
# gives that account the email and password given; once it is changed, the command leaves it.
entrypoint:
- sh
- -c
- |
mkdir -p /custom-cont-init.d
cat > /custom-cont-init.d/10-admin <<'SH'
#!/usr/bin/with-contenv sh
cd /app/www && php artisan bookstack:create-admin --initial --no-interaction --name=Admin --email="$$ADMIN_EMAIL" --password="$$ADMIN_PASSWORD"
SH
chmod 755 /custom-cont-init.d/10-admin
exec /init
depends_on:
mariadb:
condition: service_healthy
volumes:
- config:/config
mariadb:
image: lscr.io/linuxserver/mariadb:11.8.8-r0-ls235
restart: unless-stopped
environment:
PUID: "1000"
PGID: "1000"
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: bookstack
MYSQL_USER: bookstack
MYSQL_PASSWORD: ${DB_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "mariadb-admin ping -h 127.0.0.1 -u bookstack -p\"$$MYSQL_PASSWORD\" --silent"]
interval: 5s
retries: 30
volumes:
- db:/config
volumes:
config:
db:
