diff --git a/lech/docker/caddy.sh b/lech/docker/caddy.sh index d129b72..aa13e44 100755 --- a/lech/docker/caddy.sh +++ b/lech/docker/caddy.sh @@ -4,7 +4,7 @@ set -e up () { docker network create pew-net || true - + # main caddy container docker build -t customcaddy:latest -f Dockerfile.caddy . @@ -16,8 +16,8 @@ up () { --volume /mammoth/files:/www/seaturtle.pw_files:ro \ --volume /mammoth/gis/bigcavemaps.com:/www/bigcavemaps.com:ro \ --volume /mammoth/gis/source:/gis/source:ro \ - --volume /mammoth/k8s-config/caddy/Caddyfile:/etc/caddy/Caddyfile:ro \ - --volume /mammoth/k8s-config/caddy/data:/data:rw \ + --volume $HOME/scripts-private/lech/Caddyfile:/etc/caddy/Caddyfile:ro \ + --volume /mammoth/caddy/data:/data:rw \ --publish 80:80 \ --publish 443:443 \ --publish 443:443/udp \ diff --git a/lech/docker/firefly.sh b/lech/docker/firefly.sh index b0b55d7..2430175 100755 --- a/lech/docker/firefly.sh +++ b/lech/docker/firefly.sh @@ -24,7 +24,7 @@ up () { --env DB_USERNAME=firefly \ --env DB_PASSWORD=firefly \ --env APP_URL=https://ff.seaturtle.pw \ - --volume /mammoth/k8s-config/firefly/data:/var/www/html/storage/upload:rw \ + --volume /mammoth/firefly/data:/var/www/html/storage/upload:rw \ --network pew-net \ docker.io/fireflyiii/core:latest @@ -38,7 +38,7 @@ up () { --env MYSQL_PASSWORD=firefly \ --env MYSQL_DATABASE=firefly \ --env MYSQL_USER=firefly \ - --volume /mammoth/k8s-config/firefly/mariadb:/var/lib/mysql:rw \ + --volume /mammoth/firefly/mariadb:/var/lib/mysql:rw \ --network pew-net \ docker.io/mariadb:10.5.6 } diff --git a/lech/docker/gitea.sh b/lech/docker/gitea.sh index c878f49..197d1dd 100755 --- a/lech/docker/gitea.sh +++ b/lech/docker/gitea.sh @@ -17,7 +17,7 @@ up () { --env DISABLE_REGISTRATION=true \ --env REQUIRE_SIGNIN_VIEW=false \ --env USER_UID=1000 \ - --volume /mammoth/k8s-config/gitea/data:/data:rw \ + --volume /mammoth/gitea/data:/data:rw \ --volume /etc/localtime:/etc/localtime:ro \ --volume /etc/timezone:/etc/timezone:ro \ --publish 2222:2222 \ diff --git a/lech/docker/mapproxy-seed.yaml b/lech/docker/mapproxy-seed.yaml new file mode 100644 index 0000000..e0d12d6 --- /dev/null +++ b/lech/docker/mapproxy-seed.yaml @@ -0,0 +1,23 @@ +# --------------------------------------- +# MapProxy example seeding configuration. +# --------------------------------------- +# +# This is a minimal MapProxy seeding configuration. +# See full_seed_example.yaml and the documentation for more options. +# + +seeds: + myseed1: + caches: [osm_cache, osmTopo_cache] + levels: + to: 10 + +cleanups: + # myclean1: + # caches: [osm_cache, osmTopo_cache] + # remove_before: + # days: 14 + # levels: + # from: 11 + +coverages: diff --git a/lech/docker/mapproxy.sh b/lech/docker/mapproxy.sh index f7b1e42..373358e 100755 --- a/lech/docker/mapproxy.sh +++ b/lech/docker/mapproxy.sh @@ -7,8 +7,8 @@ up () { docker run \ --detach \ --name mapproxy \ - --volume /mammoth/k8s-config/mapproxy/mapproxy.yaml:/mapproxy/mapproxy.yaml:ro \ - --volume /mammoth/k8s-config/mapproxy/seed.yaml:/mapproxy/seed.yaml:ro \ + --volume $PWD/mapproxy.yaml:/mapproxy/mapproxy.yaml:ro \ + --volume $PWD/mapproxy-seed.yaml:/mapproxy/seed.yaml:ro \ --volume /mammoth/gis/mapproxy/cache_data:/mapproxy/cache_data:rw \ --network pew-net \ docker.io/kartoza/mapproxy:latest diff --git a/lech/docker/mapproxy.yaml b/lech/docker/mapproxy.yaml new file mode 100644 index 0000000..139dc3e --- /dev/null +++ b/lech/docker/mapproxy.yaml @@ -0,0 +1,83 @@ +# ------------------------------- +# MapProxy example configuration. +# ------------------------------- +# +# This is a minimal MapProxy configuration. +# See full_example.yaml and the documentation for more options. +# + +# Starts the following services: +# Demo: +# http://localhost:8080/demo +# WMS: +# capabilities: http://localhost:8080/service?REQUEST=GetCapabilities +# WMTS: +# capabilities: http://localhost:8080/wmts/1.0.0/WMTSCapabilities.xml +# first tile: http://localhost:8080/wmts/osm/webmercator/0/0/0.png +# Tile service (compatible with OSM/etc.) +# first tile: http://localhost:8080/tiles/osm/webmercator/0/0/0.png +# TMS: +# note: TMS is not compatible with OSM/Google Maps/etc. +# fist tile: http://localhost:8080/tms/1.0.0/osm/webmercator/0/0/0.png +# KML: +# initial doc: http://localhost:8080/kml/osm/webmercator + +services: + demo: + wmts: + restful_template: + '/{Layer}/{TileMatrixSet}/{TileMatrix}/{TileCol}/{TileRow}.png' + +layers: + - name: blacksburg_lidar + title: Blacksburg Lidar + sources: [blacksburg_lidar_cache] + - name: osm + title: OSM + sources: [osm_cache] + - name: osmTopo + title: OSM Topo + sources: [osmTopo_cache] + - name: VAPublicSinkholes + title: VA Public Sinkholes + sources: [va_public_sinkholes] + +caches: + blacksburg_lidar_cache: + grids: [GLOBAL_WEBMERCATOR] + sources: [blacksburg_lidar] + osm_cache: + grids: [GLOBAL_WEBMERCATOR] + sources: [osm_tiles] + osmTopo_cache: + grids: [GLOBAL_WEBMERCATOR] + sources: [osmTopo_tiles] + va_public_sinkholes: + grids: [GLOBAL_WEBMERCATOR] + sources: [va_public_sinkholes] + +sources: + blacksburg_lidar: + type: tile + grid: GLOBAL_WEBMERCATOR + url: https://tile.bigcavemaps.com/geoserver/gwc/service/wmts/rest/bburg:lidar/line/WebMercatorQuad/%(z)s/%(x)s/%(y)s?format=image/png + osm_tiles: + type: tile + grid: GLOBAL_WEBMERCATOR + url: http://c.tile.openstreetmap.org/%(z)s/%(x)s/%(y)s.png + osmTopo_tiles: + type: tile + grid: GLOBAL_WEBMERCATOR + url: https://b.tile.opentopomap.org/%(z)s/%(x)s/%(y)s.png + va_public_sinkholes: + type: arcgis + req: + layers: VA Sinkholes + transparent: true + url: https://vanhde.org/arcgis/rest/services/VA_Public/pred_Sinkholes/MapServer + on_error: + 500: + response: transparent + cache: True + +globals: diff --git a/lech/docker/mastodon.sh b/lech/docker/mastodon.sh index 67f51bb..2daaf87 100755 --- a/lech/docker/mastodon.sh +++ b/lech/docker/mastodon.sh @@ -27,7 +27,7 @@ up () { --env DB_NAME=$DB_NAME \ --env DB_PASS=$DB_PASS \ --env DB_PORT=$DB_PORT \ - --volume /mammoth/k8s-config/mastodon/public/system:/mastodon/public/system:rw \ + --volume /mammoth/mastodon/public/system:/mastodon/public/system:rw \ --network pew-net \ ghcr.io/mastodon/mastodon:v4.1 bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000" @@ -62,7 +62,7 @@ up () { --env DB_NAME=$DB_NAME \ --env DB_PASS=$DB_PASS \ --env DB_PORT=$DB_PORT \ - --volume /mammoth/k8s-config/mastodon/public/system:/mastodon/public/system:rw \ + --volume /mammoth/mastodon/public/system:/mastodon/public/system:rw \ --network pew-net \ ghcr.io/mastodon/mastodon:v4.1 bundle exec sidekiq @@ -75,7 +75,7 @@ up () { --env POSTGRES_USER=$DB_USER \ --env POSTGRES_DB=$DB_NAME \ --env POSTGRES_PASSWORD=$DB_PASS \ - --volume /mammoth/k8s-config/mastodon/postgres/data:/var/lib/postgresql/data:rw \ + --volume /mammoth/mastodon/postgres/data:/var/lib/postgresql/data:rw \ --network pew-net \ docker.io/postgres:14-alpine @@ -83,7 +83,7 @@ up () { --detach \ --name mastodon-redis \ --restart unless-stopped \ - --volume /mammoth/k8s-config/mastodon/redis/data:/data:rw \ + --volume /mammoth/mastodon/redis/data:/data:rw \ --network pew-net \ docker.io/redis:7-alpine } diff --git a/lech/docker/minio.sh b/lech/docker/minio.sh index 3cc6805..cb7e574 100755 --- a/lech/docker/minio.sh +++ b/lech/docker/minio.sh @@ -2,18 +2,25 @@ set -e +CERTS=/mammoth/k8s-config/caddy/data/caddy/certificates/acme.zerossl.com-v2-dv90 + up () { + echo -n "Enter MINIO_ROOT_PASSWORD: " + read MINIO_ROOT_PASSWORD + docker run \ --detach \ --name minio \ --restart unless-stopped \ - --env-file minio.env \ - --env MINIO_BROWSER_REDIRECT_URL=https://s3.bigcavemaps.com \ + --env MINIO_BROWSER_REDIRECT_URL=https://s3.console.bigcavemaps.com \ --env MINIO_ROOT_USER=admin \ - --env MINIO_SERVER_URL=https://s3.bigcavemaps.com:9000 \ + --env MINIO_ROOT_PASSWORD=$MINIO_ROOT_PASSWORD \ + --env MINIO_SERVER_URL=https://s3.bigcavemaps.com \ --volume /mammoth/minio:/data:rw \ - --volume /mammoth/k8s-config/caddy/data/caddy/certificates/acme.zerossl.com-v2-dv90/s3.bigcavemaps.com/s3.bigcavemaps.com.crt:/certs/public.crt:ro \ - --volume /mammoth/k8s-config/caddy/data/caddy/certificates/acme.zerossl.com-v2-dv90/s3.bigcavemaps.com/s3.bigcavemaps.com.key:/certs/private.key:ro \ + --volume $CERTS/s3.bigcavemaps.com/s3.bigcavemaps.com.crt:/certs/public.crt:ro \ + --volume $CERTS/s3.bigcavemaps.com/s3.bigcavemaps.com.key:/certs/private.key:ro \ + --volume $CERTS/s3.console.bigcavemaps.com/s3.console.bigcavemaps.com.crt:/certs/console/public.crt:ro \ + --volume $CERTS/s3.console.bigcavemaps.com/s3.console.bigcavemaps.com.key:/certs/console/private.key:ro \ --publish 9000:9000 \ --publish 9090:9090 \ quay.io/minio/minio:latest server /data --console-address ":9090" --certs-dir /certs diff --git a/lech/docker/plex.sh b/lech/docker/plex.sh index 4fec192..77c1e1f 100755 --- a/lech/docker/plex.sh +++ b/lech/docker/plex.sh @@ -8,11 +8,12 @@ up () { --detach \ --name plex \ --restart unless-stopped \ + --runtime nvidia \ --env PUID=1000 \ --env PGID=1000 \ - --env VERSION=docker \ --env PLEX_CLAIM=claim-QCs9nSWJ23sex_75xQ_a \ - --volume /mammoth/k8s-config/caddy/data/caddy/certificates/acme.zerossl.com-v2-dv90/plex.seaturtle.pw:/certs:ro \ + --env NVIDIA_VISIBLE_DEVICES=all \ + --env VERSION=docker \ --volume /mammoth/plex/config:/config:rw \ --volume /mammoth/media/audiobooks:/media/audiobooks:ro \ --volume /mammoth/media/movies:/media/movies:ro \ @@ -21,7 +22,7 @@ up () { --volume /mammoth/media/tv:/media/tv:ro \ --volume /media-vtluug:/media/media-vtluug:ro \ --volume /mammoth/tmp/plex/transcode:/transcode:rw \ - --device=/dev/dri:/dev/dri:rw \ + --publish 32400:32400 \ --network pew-net \ ghcr.io/linuxserver/plex:latest }