From 09f942bc65cd003cc734e1a4d27c7436fe722598 Mon Sep 17 00:00:00 2001 From: Paul Walko Date: Mon, 2 Sep 2024 16:53:27 -0400 Subject: [PATCH] overdue update --- lech/docker/caddy.sh | 7 +++- lech/docker/immich.sh | 70 +++++++++++++++++++++++++++++++++++++++ lech/docker/mastodon.sh | 6 ++-- lech/docker/merginmaps.sh | 4 +-- lech/docker/picoshare.sh | 2 +- lech/docker/pretalx.sh | 50 ++++++++++++++++++++++++++++ lech/docker/pretix.sh | 49 +++++++++++++++++++++++++++ 7 files changed, 181 insertions(+), 7 deletions(-) create mode 100755 lech/docker/immich.sh create mode 100755 lech/docker/pretalx.sh create mode 100755 lech/docker/pretix.sh diff --git a/lech/docker/caddy.sh b/lech/docker/caddy.sh index 5265fb8..8a7bab8 100755 --- a/lech/docker/caddy.sh +++ b/lech/docker/caddy.sh @@ -15,16 +15,21 @@ up () { --label com.centurylinklabs.watchtower.enable=false \ --privileged \ --volume /mammoth/archive:/www/bigcavemaps.com/files/paul/archive:ro \ + --volume /mammoth/wind-files:/www/bigcavemaps.com/files/paul/wind-files:ro \ --volume /mammoth/archive/cavepedia/cavepedia-data/00_files:/www/bigcavemaps.com/files/cavepedia-data/00_files:ro \ - --volume /mammoth/archive/vpicc/public:/www/bigcavemaps.com/files/vpicc:ro \ + --volume /mammoth/archive/vpicc/private/balister-cave:/www/bigcavemaps.com/files/vpicc/private/balister-cave:ro \ + --volume /mammoth/archive/vpicc/public:/www/bigcavemaps.com/files/vpicc/public:ro \ --volume /mammoth/archive/websites/wacz:/www/bigcavemaps.com/files/websites:ro \ --volume /mammoth/files/seaturtle.pw:/www/seaturtle.pw/files:ro \ --volume /mammoth/gis/bigcavemaps.com:/www/bigcavemaps.com/index:ro \ --volume /mammoth/gis/source/public:/www/bigcavemaps.com/files/gis/source/public:ro \ --volume /mammoth/merginmaps/projects:/merginmaps-data:ro \ + --volume /mammoth/pretalx/data/media:/pretalx/data/media:ro \ + --volume /mammoth/pretalx/public/static:/pretalx/public/static:ro \ --volume /mammoth/replayweb.page:/www/files/bigcavemaps.com/replayweb.page:ro \ --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 \ diff --git a/lech/docker/immich.sh b/lech/docker/immich.sh new file mode 100755 index 0000000..2e433d8 --- /dev/null +++ b/lech/docker/immich.sh @@ -0,0 +1,70 @@ +#!/bin/bash + +set -e + +up () { + # Exposed on port 3001 in pew-net + docker run \ + --detach \ + --name immich-server \ + --restart unless-stopped \ + --env DB_DATABASE_NAME=immich_db \ + --env DB_HOSTNAME=immich-pg \ + --env DB_USERNAME=immich_user \ + --env DB_PASSWORD=immich_pw \ + --env IMMICH_MACHINE_LEARNING_URL=http://immich-ml:3003 \ + --env REDIS_HOSTNAME=immich-redis \ + --volume /mammoth/immich/upload:/usr/src/app/upload:rw \ + --volume /mammoth/photos:/external_library/photos:ro \ + --volume /etc/localtime:/etc/localtime:ro \ + --network pew-net \ + ghcr.io/immich-app/immich-server:v1.108.0 + + docker run \ + --detach \ + --name immich-ml \ + --restart unless-stopped \ + --env DB_DATABASE_NAME=immich_db \ + --env DB_HOSTNAME=immich-pg \ + --env DB_USERNAME=immich_user \ + --env DB_PASSWORD=immich_pw \ + --env IMMICH_MACHINE_LEARNING_URL=http://immich-ml:3003 \ + --env REDIS_HOSTNAME=immich-redis \ + --volume /mammoth/immich/cache:/cache:rw \ + --network pew-net \ + ghcr.io/immich-app/immich-machine-learning:v1.108.0 + + docker run \ + --detach \ + --name immich-redis \ + --restart unless-stopped \ + --network pew-net \ + docker.io/redis:6 + + docker run \ + --detach \ + --name immich-pg \ + --restart unless-stopped \ + --env POSTGRES_PASSWORD=immich_pw \ + --env POSTGRES_USER=immich_user \ + --env POSTGRES_DB=immich_db \ + --env POSTGRES_INITDB_ARGS=--data-checksums \ + --volume /mammoth/immich/postgres:/var/lib/postgresql/data:rw \ + --network pew-net \ + docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0 \ + postgres -c shared_preload_libraries=vectors.so -c 'search_path="$$user", public, vectors' -c logging_collector=on -c max_wal_size=2GB -c shared_buffers=512MB -c wal_compression=on +} + + +down () { + docker stop immich-server || true + docker rm immich-server || true + docker stop immich-ml || true + docker rm immich-ml || true + docker stop immich-redis || true + docker rm immich-redis || true + docker stop immich-pg || true + docker rm immich-pg || true +} + +$@ diff --git a/lech/docker/mastodon.sh b/lech/docker/mastodon.sh index 670364b..3cef061 100755 --- a/lech/docker/mastodon.sh +++ b/lech/docker/mastodon.sh @@ -17,7 +17,7 @@ up () { --detach \ --name mastodon-web \ --restart unless-stopped \ - --env-file mastodon.env \ + --env-file $HOME/scripts-private/lech/mastodon.env \ --env TRUSTED_PROXY_IP=$TRUSTED_PROXY_IP \ --env LOCAL_DOMAIN=$LOCAL_DOMAIN \ --env REDIS_HOST=$REDIS_HOST \ @@ -35,7 +35,7 @@ up () { --detach \ --name mastodon-streaming \ --restart unless-stopped \ - --env-file mastodon.env \ + --env-file $HOME/scripts-private/lech/mastodon.env \ --env TRUSTED_PROXY_IP=$TRUSTED_PROXY_IP \ --env LOCAL_DOMAIN=$LOCAL_DOMAIN \ --env REDIS_HOST=$REDIS_HOST \ @@ -52,7 +52,7 @@ up () { --detach \ --name mastodon-sidekiq \ --restart unless-stopped \ - --env-file mastodon.env \ + --env-file $HOME/scripts-private/lech/mastodon.env \ --env TRUSTED_PROXY_IP=$TRUSTED_PROXY_IP \ --env LOCAL_DOMAIN=$LOCAL_DOMAIN \ --env REDIS_HOST=$REDIS_HOST \ diff --git a/lech/docker/merginmaps.sh b/lech/docker/merginmaps.sh index 2fac2d5..3356858 100755 --- a/lech/docker/merginmaps.sh +++ b/lech/docker/merginmaps.sh @@ -11,14 +11,14 @@ up () { --user 901:999 \ --volume /mammoth/merginmaps/projects:/data:rw \ --network pew-net \ - lutraconsulting/merginmaps-backend:2023.6.1 + lutraconsulting/merginmaps-backend:2024.2.2 docker run \ --detach \ --restart unless-stopped \ --name merginmaps-web \ --network pew-net \ - lutraconsulting/merginmaps-frontend:2023.6.1 + lutraconsulting/merginmaps-frontend:2024.2.2 docker run \ --detach \ diff --git a/lech/docker/picoshare.sh b/lech/docker/picoshare.sh index d86a365..3dc99bb 100755 --- a/lech/docker/picoshare.sh +++ b/lech/docker/picoshare.sh @@ -8,7 +8,7 @@ up () { --detach \ --name picoshare \ --env PS_BEHIND_PROXY=true \ - --env-file picoshare.env \ + --env-file $HOME/scripts-private/lech/picoshare.env \ --restart unless-stopped \ --volume /mammoth/picoshare/data:/data:rw \ --network pew-net \ diff --git a/lech/docker/pretalx.sh b/lech/docker/pretalx.sh new file mode 100755 index 0000000..bae1363 --- /dev/null +++ b/lech/docker/pretalx.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +set -e + +up () { + docker run \ + --detach \ + --name pretalx-db \ + --restart unless-stopped \ + --env MYSQL_DATABASE=pretalx_db \ + --env MYSQL_USER=pretalx_user \ + --env MYSQL_PASSWORD=pretalx_pw \ + --env MYSQL_RANDOM_ROOT_PASSWORD=1 \ + --volume /mammoth/pretalx/mysql:/var/lib/mysql:rw \ + --network pew-net \ + mysql:8 mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci + + docker run \ + --detach \ + --name pretalx-redis \ + --restart unless-stopped \ + --volume /mammoth/pretalx/redis:/data:rw \ + --network pew-net \ + redis:7 + + echo 'Waiting 5 seconds for mysql to start up...' + sleep 5 + # Exposed on port 80 in pew-net + docker run \ + --detach \ + --name pretalx \ + --restart unless-stopped \ + --volume /mammoth/pretalx/pretalx.cfg:/etc/pretalx/pretalx.cfg:ro \ + --volume /mammoth/pretalx/data:/data:rw \ + --volume /mammoth/pretalx/public:/public:rw \ + --network pew-net \ + pretalx/standalone:v2024.1.0 +} + +down () { + docker stop pretalx || true + docker rm pretalx || true + docker stop pretalx-db || true + docker rm pretalx-db || true + docker stop pretalx-redis || true + docker rm pretalx-redis || true +} + + +$@ diff --git a/lech/docker/pretix.sh b/lech/docker/pretix.sh new file mode 100755 index 0000000..649c460 --- /dev/null +++ b/lech/docker/pretix.sh @@ -0,0 +1,49 @@ +#!/bin/bash + +set -e + +up () { + docker run \ + --detach \ + --name pretix-db \ + --restart unless-stopped \ + --env POSTGRES_DB=pretix_db \ + --env POSTGRES_PASSWORD=pretix_pw \ + --env POSTGRES_USER=pretix_user \ + --volume /mammoth/pretix/postgres:/var/lib/postgresql/data:rw \ + --network pew-net \ + postgres:12 + + docker run \ + --detach \ + --name pretix-redis \ + --restart unless-stopped \ + --volume /mammoth/pretix/redis:/data:rw \ + --network pew-net \ + redis:7 + + echo 'Waiting 5 seconds for postgresql to start up...' + sleep 5 + + # Exposed on port 80 in pew-net + docker run \ + --detach \ + --name pretix \ + --restart unless-stopped \ + --volume /mammoth/pretix/pretix-config:/etc/pretix:rw \ + --volume /mammoth/pretix/pretix-data:/data:rw \ + --network pew-net \ + pretix/standalone:stable all +} + +down () { + docker stop pretix || true + docker rm pretix || true + docker stop pretix-db || true + docker rm pretix-db || true + docker stop pretix-redis || true + docker rm pretix-redis || true +} + + +$@