master
Paul Walko 2024-09-07 21:33:44 -04:00
parent c78ef4c6d3
commit 7cfbd7dbe2
3 changed files with 174 additions and 1 deletions

View File

@ -30,9 +30,10 @@ up () {
--volume $HOME/scripts-private/lech/Caddyfile:/etc/caddy/Caddyfile:ro \
--volume /mammoth/caddy/data:/data:rw \
--volume /mammoth/caddy/logs:/logs:rw \
--publish 80:80 \
--publish 443:443 \
--publish 443:443/udp \
--publish [$(tailscale ip -6)]:8443:8443 \
--publish [$(tailscale ip -6)]:8443:8443/udp \
--network pew-net \
customcaddy:latest
}

87
lech/docker/pngx-cave.sh Executable file
View File

@ -0,0 +1,87 @@
#!/bin/bash
set -e
up () {
docker run \
--detach \
--name pngx-cave-db \
--restart unless-stopped \
--env POSTGRES_DB=pngx-cave_db \
--env POSTGRES_USER=pngx-cave_user \
--env POSTGRES_PASSWORD=pngx-cave_pw \
--volume /mammoth/pngx-cave/postgres:/var/lib/postgresql/data:rw \
--network pew-net \
docker.io/library/postgres:16
docker run \
--detach \
--name pngx-cave-redis \
--restart unless-stopped \
--volume /mammoth/pngx-cave/redis:/data:rw \
--network pew-net \
docker.io/library/redis:7
echo 'Waiting 5 seconds for postgres to start up...'
sleep 5
# Exposed on port 8000 in pew-net
docker run \
--detach \
--name pngx-cave \
--restart unless-stopped \
--env PAPERLESS_DBHOST=pngx-cave-db \
--env PAPERLESS_DBNAME=pngx-cave_db \
--env PAPERLESS_DBPASS=pngx-cave_pw \
--env PAPERLESS_DBUSER=pngx-cave_user \
--env PAPERLESS_EMAIL_FROM=paul@bigcavemaps.com \
--env PAPERLESS_EMAIL_HOST=smtp.postmarkapp.com \
--env PAPERLESS_EMAIL_PORT=587 \
--env PAPERLESS_EMAIL_TLS=True \
--env PAPERLESS_OCR_LANGUAGE=eng \
--env PAPERLESS_OCR_USER_ARGS='{"continue_on_soft_render_error": true}' \
--env PAPERLESS_REDIS=redis://pngx-cave-redis:6379 \
--env PAPERLESS_TASK_WORKERS=10 \
--env PAPERLESS_TIKA_ENABLED=1 \
--env PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://pngx-cave-gotenberg:3000 \
--env PAPERLESS_TIKA_ENDPOINT=http://pngx-cave-tika:9998 \
--env PAPERLESS_TIME_ZONE=America/New_York \
--env PAPERLESS_URL=https://pngx.caving.dev \
--env USERMAP_UID=1000 \
--env USERMAP_GID=1000 \
--env-file $HOME/scripts-private/lech/pngx-cave.env \
--volume /mammoth/pngx-cave/pngx/data:/usr/src/paperless/data:rw \
--volume /mammoth/pngx-cave/pngx/media:/usr/src/paperless/media:rw \
--volume /mammoth/pngx-cave/pngx/export:/usr/src/paperless/export:rw \
--volume /mammoth/pngx-cave/pngx/consume:/usr/src/paperless/consume:rw \
--network pew-net \
ghcr.io/paperless-ngx/paperless-ngx:latest
docker run \
--detach \
--name pngx-cave-gotenberg \
--network pew-net \
docker.io/gotenberg/gotenberg:8.7 gotenberg --chromium-disable-javascript=true --chromium-allow-list=file:///tmp/.*
docker run \
--detach \
--name pngx-cave-tika \
--restart unless-stopped \
docker.io/apache/tika:latest
}
down () {
docker stop pngx-cave-db || true
docker rm pngx-cave-db || true
docker stop pngx-cave-redis || true
docker rm pngx-cave-redis || true
docker stop pngx-cave || true
docker rm pngx-cave || true
docker stop pngx-cave-gotenberg || true
docker rm pngx-cave-gotenberg || true
docker stop pngx-cave-tika || true
docker rm pngx-cave-tika || true
}
$@

85
lech/docker/pngx.sh Executable file
View File

@ -0,0 +1,85 @@
#!/bin/bash
set -e
up () {
docker run \
--detach \
--name pngx-db \
--restart unless-stopped \
--env POSTGRES_DB=pngx_db \
--env POSTGRES_USER=pngx_user \
--env POSTGRES_PASSWORD=pngx_pw \
--volume /mammoth/pngx/postgres:/var/lib/postgresql/data:rw \
--network pew-net \
docker.io/library/postgres:16
docker run \
--detach \
--name pngx-redis \
--restart unless-stopped \
--volume /mammoth/pngx/redis:/data:rw \
--network pew-net \
docker.io/library/redis:7
echo 'Waiting 5 seconds for postgres to start up...'
sleep 5
# Exposed on port 8000 in pew-net
docker run \
--detach \
--name pngx \
--restart unless-stopped \
--env PAPERLESS_DBHOST=pngx-db \
--env PAPERLESS_DBNAME=pngx_db \
--env PAPERLESS_DBPASS=pngx_pw \
--env PAPERLESS_DBUSER=pngx_user \
--env PAPERLESS_EMAIL_FROM=paul@bigcavemaps.com \
--env PAPERLESS_EMAIL_HOST=smtp.postmarkapp.com \
--env PAPERLESS_EMAIL_PORT=587 \
--env PAPERLESS_EMAIL_TLS=True \
--env PAPERLESS_OCR_LANGUAGE=eng \
--env PAPERLESS_REDIS=redis://pngx-redis:6379 \
--env PAPERLESS_TIKA_ENABLED=1 \
--env PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://pngx-gotenberg:3000 \
--env PAPERLESS_TIKA_ENDPOINT=http://pngx-tika:9998 \
--env PAPERLESS_TIME_ZONE=America/New_York \
--env PAPERLESS_URL=https://pngx.bigcavemaps.com:8443 \
--env USERMAP_UID=1000 \
--env USERMAP_GID=1000 \
--env-file $HOME/scripts-private/lech/pngx.env \
--volume /mammoth/pngx/pngx/data:/usr/src/paperless/data:rw \
--volume /mammoth/pngx/pngx/media:/usr/src/paperless/media:rw \
--volume /mammoth/pngx/pngx/export:/usr/src/paperless/export:rw \
--volume /mammoth/pngx/pngx/consume:/usr/src/paperless/consume:rw \
--network pew-net \
ghcr.io/paperless-ngx/paperless-ngx:latest
docker run \
--detach \
--name pngx-gotenberg \
--network pew-net \
docker.io/gotenberg/gotenberg:8.7 gotenberg --chromium-disable-javascript=true --chromium-allow-list=file:///tmp/.*
docker run \
--detach \
--name pngx-tika \
--restart unless-stopped \
docker.io/apache/tika:latest
}
down () {
docker stop pngx-db || true
docker rm pngx-db || true
docker stop pngx-redis || true
docker rm pngx-redis || true
docker stop pngx || true
docker rm pngx || true
docker stop pngx-gotenberg || true
docker rm pngx-gotenberg || true
docker stop pngx-tika || true
docker rm pngx-tika || true
}
$@