From f7afb018db2ca8f6d400124992677ccd28ff7aca Mon Sep 17 00:00:00 2001 From: Paul Walko Date: Sat, 2 Dec 2023 09:44:19 -0500 Subject: [PATCH] lech: bookstack --- lech/docker/bookstack.sh | 52 +++++++++++++++++++++++++++++++++++++++ lech/docker/caddy.sh | 5 ++-- lech/docker/watchtower.sh | 2 +- 3 files changed, 56 insertions(+), 3 deletions(-) create mode 100755 lech/docker/bookstack.sh diff --git a/lech/docker/bookstack.sh b/lech/docker/bookstack.sh new file mode 100755 index 0000000..8e6b90a --- /dev/null +++ b/lech/docker/bookstack.sh @@ -0,0 +1,52 @@ +#!/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 +} + +$@ diff --git a/lech/docker/caddy.sh b/lech/docker/caddy.sh index 8aeb7f6..91034d9 100755 --- a/lech/docker/caddy.sh +++ b/lech/docker/caddy.sh @@ -14,8 +14,9 @@ up () { --restart unless-stopped \ --label com.centurylinklabs.watchtower.enable=false \ --privileged \ - --volume /mammoth/files:/www/seaturtle.pw_files:ro \ - --volume /mammoth/gis/bigcavemaps.com:/www/bigcavemaps.com:ro \ + --volume /mammoth/archive/vpicc/public:/www/files/bigcavemaps.com/vpicc:ro \ + --volume /mammoth/files/seaturtle.pw:/www/files/seaturtle.pw:ro \ + --volume /mammoth/gis/bigcavemaps.com:/www/gis/bigcavemaps.com:ro \ --volume /mammoth/gis/source:/gis/source:ro \ --volume $HOME/scripts-private/lech/Caddyfile:/etc/caddy/Caddyfile:ro \ --volume /mammoth/caddy/data:/data:rw \ diff --git a/lech/docker/watchtower.sh b/lech/docker/watchtower.sh index 2c1810d..da118ca 100755 --- a/lech/docker/watchtower.sh +++ b/lech/docker/watchtower.sh @@ -8,7 +8,7 @@ up () { --detach \ --name watchtower \ --volume /var/run/docker.sock:/var/run/docker.sock:rw \ - ghcr.io/containrrr/watchtower:amd64-1.4.0 --interval 1800 + ghcr.io/containrrr/watchtower:amd64-1.7.1 --interval 1800 } down () {