nov 2024 sync

master
Paul Walko 2024-11-23 12:26:34 -05:00
parent 0b3b784b99
commit b53336ced5
8 changed files with 213 additions and 48 deletions

View File

@ -1,2 +1,3 @@
CaverEveryHour/
meshtastic-map/
*.env

View File

@ -32,6 +32,8 @@ up () {
--volume /mammoth/caddy/logs:/logs:rw \
--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
}

View File

@ -18,7 +18,7 @@ up () {
--volume /mammoth/photos:/external_library/photos:ro \
--volume /etc/localtime:/etc/localtime:ro \
--network pew-net \
ghcr.io/immich-app/immich-server:v1.116.2
ghcr.io/immich-app/immich-server:v1.120.2
docker run \
--detach \
@ -32,7 +32,7 @@ up () {
--env REDIS_HOSTNAME=immich-redis \
--volume /mammoth/immich/cache:/cache:rw \
--network pew-net \
ghcr.io/immich-app/immich-machine-learning:v1.116.2
ghcr.io/immich-app/immich-machine-learning:v1.120.2
docker run \
--detach \

82
lech/docker/mesh.sh Executable file
View File

@ -0,0 +1,82 @@
#!/bin/bash
set -e
sudo sysctl -w vm.max_map_count=262144
up () {
# docker run \
# --detach \
# --name mesh-mq \
# --volume /mammoth/mesh/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf:ro \
# --volume /mammoth/mesh/mosquitto/passwd:/mosquitto/config/passwd:ro \
# --publish 1883:1883 \
# eclipse-mosquitto:2
#
# docker run \
# --detach \
# --name mesh-es \
# --env discovery.type=single-node \
# --env http.host=0.0.0.0 \
# --env xpack.security.enabled=false \
# --volume /mammoth/mesh/elasticsearch/data:/usr/share/elasticsearch/data:rw \
# --network pew-net \
# docker.elastic.co/elasticsearch/elasticsearch:8.15.2
#
# docker run \
# --detach \
# --name mesh-kb \
# --env SERVER_PUBLICBASEURL=https://kibana.caving.dev:8443 \
# --env ELASTICSEARCH_HOST='["http://mesh-es:9200"]' \
# --volume /mammoth/mesh/kibana/data:/usr/share/kibana/data:rw \
# --network pew-net \
# docker.elastic.co/kibana/kibana:8.15.2
#
# docker run \
# --detach \
# --name mesh-mc \
# --network pew-net \
# memcached:1.6
docker run \
--detach \
--name mesh-fb \
--volume /mammoth/mesh/filebeat/filebeat.yml:/usr/share/filebeat/filebeat.yml:ro \
--network pew-net \
docker.elastic.co/beats/filebeat:8.15.2
#
# docker run \
# --detach \
# --name mesh-lg \
# --volume /mammoth/mesh/logstash/pipeline:/usr/share/logstash/pipeline:ro \
# --network pew-net \
# docker.elastic.co/logstash/logstash-oss:8.15.2
#
# docker run \
# --detach \
# --name mesh-gf \
# --user 1000 \
# --env GF_DOMAIN=mesh.caving.dev \
# --env GF_SERVER_ROOT_URL=https://mesh.caving.dev \
# --volume /mammoth/mesh/grafana/grafana:/var/lib/grafana:rw \
# --network pew-net \
# grafana/grafana-oss:11.2.1
}
down () {
# docker stop mesh-mq || true
# docker rm mesh-mq || true
# docker stop mesh-es || true
# docker rm mesh-es || true
# docker stop mesh-kb || true
# docker rm mesh-kb || true
# docker stop mesh-mc || true
# docker rm mesh-mc || true
docker stop mesh-fb || true
docker rm mesh-fb || true
# docker stop mesh-lg || true
# docker rm mesh-lg || true
# docker stop mesh-gf || true
# docker rm mesh-gf || true
}
$@

49
lech/docker/meshmap.sh Executable file
View File

@ -0,0 +1,49 @@
#!/bin/bash
set -e
pushd meshtastic-map &>/dev/null
docker build -t meshtastic-map:latest .
popd &>/dev/null
up () {
docker run \
--detach \
--name meshmap-db \
--env MARIADB_DATABASE=meshtastic-map_db \
--env MARIADB_ROOT_PASSWORD=meshtastic-map_pw \
--volume /mammoth/meshmap/db/mariadb:/bitnami/mariadb:rw \
--network pew-net \
bitnami/mariadb
echo 'Waiting 10 seconds for mariadb to start up...'
sleep 10
docker run \
--detach \
--name meshmap-mqtt \
--env-file $HOME/scripts-private/lech/meshmap.env \
--env DATABASE_URL="mysql://root:meshtastic-map_pw@meshmap-db:3306/meshtastic-map_db?connection_limit=100" \
--network pew-net \
meshtastic-map:latest /app/docker/mqtt.sh
# 8080 on pew-net
docker run \
--detach \
--name meshmap-map \
--env DATABASE_URL="mysql://root:meshtastic-map_pw@meshmap-db:3306/meshtastic-map_db?connection_limit=100" \
--network pew-net \
meshtastic-map:latest /app/docker/map.sh
}
down () {
docker stop meshmap-db || true
docker rm meshmap-db || true
docker stop meshmap-mqtt || true
docker rm meshmap-mqtt || true
docker stop meshmap-map || true
docker rm meshmap-map || true
}
$@

24
lech/docker/open-webui.sh Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
set -e
up () {
docker network create pew-net || true
# Exposed on port 8080 on pew-net
docker run \
--detach \
--name open-webui \
--restart unless-stopped \
--volume /mammoth/open-webui/data:/app/backend/data:rw \
--volume /mammoth/open-webui/ollama:/root/.ollama:rw \
--network pew-net \
ghcr.io/open-webui/open-webui:ollama
}
down () {
docker stop open-webui || true
docker rm open-webui || true
}
$@

View File

@ -1,46 +0,0 @@
#!/bin/bash
set -e
up () {
# Exposed on port 80 in pew-net
docker run \
--detach \
--name photoview \
--restart unless-stopped \
--env PHOTOVIEW_DATABASE_DRIVER=mysql \
--env PHOTOVIEW_MYSQL_URL=photoview:photoview@tcp\(pv-mariadb\)/photoview \
--env PHOTOVIEW_LISTEN_IP=photoview \
--env PHOTOVIEW_LISTEN_PORT=80 \
--env PHOTOVIEW_MEDIA_CACHE=/app/cache \
--volume /mammoth/photoview/cache:/cache:rw \
--volume /mammoth/photos:/photos:ro \
--network pew-net \
viktorstrate/photoview:2
docker run \
--detach \
--name pv-mariadb \
--restart unless-stopped \
--env MYSQL_DATABASE=photoview \
--env MYSQL_USER=photoview \
--env MYSQL_PASSWORD=photoview \
--env MYSQL_RANDOM_ROOT_PASSWORD=1 \
--volume /mammoth/photoview/mysql:/var/lib/mysql:rw \
--network pew-net \
mariadb:10.5
}
down () {
docker stop photoview || true
docker stop pv-mariadb || true
docker rm photoview || true
docker rm pv-mariadb || true
}
logs () {
docker logs --follow photoview
docker logs --follow pv-mariadb
}
$@

53
lech/docker/seafile.sh Executable file
View File

@ -0,0 +1,53 @@
#!/bin/bash
set -e
up () {
docker run \
--detach \
--name seafile-db \
--restart unless-stopped \
--env MYSQL_ROOT_PASSWORD=seafile_pw \
--env MYSQL_LOG_CONSOLE=true \
--env MARIADB_AUTO_UPGRADE=1 \
--volume /mammoth/seafile/mariadb/mysql:/var/lib/mysql:rw \
--network pew-net \
mariadb:10.11
docker run \
--detach \
--name seafile-mc \
--restart unless-stopped \
--network pew-net \
memcached:1.6.18 /bin/bash -c "memcached -m 256"
echo 'Waiting 5 seconds for mariadb to start up...'
sleep 5
# Exposed on port 80 in pew-net
docker run \
--detach \
--name seafile \
--restart unless-stopped \
--env DB_HOST=seafile-db \
--env DB_ROOT_PASSWD=seafile_pw \
--env TIME_ZONE=America/New_York \
--env SEAFILE_ADMIN_EMAIL=paul@bigcavemaps.com \
--env SEAFILE_SERVER_LETSENCRYPT=false \
--env SEAFILE_SERVER_HOSTNAME=https://docs.bigcavemaps.com \
--volume /mammoth/seafile/seafile/shared:/shared:rw \
--network pew-net \
seafileltd/seafile-mc:11.0-latest
}
down () {
docker stop seafile || true
docker rm seafile || true
docker stop seafile-db || true
docker rm seafile-db || true
docker stop seafile-mc || true
docker rm seafile-mc || true
}
$@