scripts/lech/docker/bookstack.sh

53 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
set -e
up () {
# Exposed on port 80 on pew-net
docker run \
--detach \
--name bookstack \
--restart unless-stopped \
--env PUID=1000 \
--env PGID=1000 \
--env APP_URL=https://wiki.bigcavemaps.com \
--env DB_HOST=bookstack-db \
--env DB_PORT=3306 \
--env DB_USER=bookstack \
--env DB_PASS=bookstack \
--env DB_DATABASE=bookstackapp \
--env FILE_UPLOAD_SIZE_LIMIT=250 \
--volume /mammoth/bookstack/config:/config:rw \
--network pew-net \
ghcr.io/linuxserver/bookstack:latest
docker run \
--detach \
--name bookstack-db \
--restart unless-stopped \
--env PUID=1000 \
--env PGID=1000 \
--env MARIADB_ALLOW_EMPTY_ROOT_PASSWORD=1 \
--env MYSQL_ROOT_PASSWORD=bookstack \
--env TZ=America/New_York \
--env MYSQL_DATABASE=bookstackapp \
--env MYSQL_USER=bookstack \
--env MYSQL_PASSWORD=bookstack \
--volume /mammoth/bookstack/mysql:/var/lib/mysql:rw \
--network pew-net \
mariadb:10
}
down () {
docker stop bookstack || true
docker rm bookstack || true
docker stop bookstack-db || true
docker rm bookstack-db || true
}
logs () {
docker logs --follow bookstack
}
$@