scripts/lech/docker/caddy.sh

54 lines
2.0 KiB
Bash
Raw Normal View History

2023-09-05 11:40:31 -04:00
#!/bin/bash
set -e
up () {
docker network create pew-net || true
2023-09-07 21:08:48 -04:00
2023-09-05 11:40:31 -04:00
# main caddy container
docker build -t customcaddy:latest -f Dockerfile.caddy .
docker run \
--detach \
--name caddy \
--restart unless-stopped \
2023-10-29 18:12:35 -04:00
--label com.centurylinklabs.watchtower.enable=false \
2023-09-05 11:40:31 -04:00
--privileged \
2024-02-12 09:56:56 -05:00
--volume /mammoth/archive:/www/bigcavemaps.com/files/paul/archive:ro \
2024-09-02 16:53:27 -04:00
--volume /mammoth/wind-files:/www/bigcavemaps.com/files/paul/wind-files:ro \
2024-02-12 09:56:56 -05:00
--volume /mammoth/archive/cavepedia/cavepedia-data/00_files:/www/bigcavemaps.com/files/cavepedia-data/00_files:ro \
2024-09-02 16:53:27 -04:00
--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 \
2024-02-12 09:56:56 -05:00
--volume /mammoth/archive/websites/wacz:/www/bigcavemaps.com/files/websites:ro \
2024-06-01 08:52:01 -04:00
--volume /mammoth/files/seaturtle.pw:/www/seaturtle.pw/files:ro \
2024-02-12 09:56:56 -05:00
--volume /mammoth/gis/bigcavemaps.com:/www/bigcavemaps.com/index:ro \
--volume /mammoth/gis/source/public:/www/bigcavemaps.com/files/gis/source/public:ro \
2024-06-01 08:52:01 -04:00
--volume /mammoth/merginmaps/projects:/merginmaps-data:ro \
2024-09-02 16:53:27 -04:00
--volume /mammoth/pretalx/data/media:/pretalx/data/media:ro \
--volume /mammoth/pretalx/public/static:/pretalx/public/static:ro \
2023-12-03 20:39:45 -05:00
--volume /mammoth/replayweb.page:/www/files/bigcavemaps.com/replayweb.page:ro \
2023-09-07 21:08:48 -04:00
--volume $HOME/scripts-private/lech/Caddyfile:/etc/caddy/Caddyfile:ro \
--volume /mammoth/caddy/data:/data:rw \
2024-09-02 16:53:27 -04:00
--volume /mammoth/caddy/logs:/logs:rw \
2023-09-05 11:40:31 -04:00
--publish 443:443 \
--publish 443:443/udp \
2024-12-16 20:33:10 -05:00
--publish 6233:6233 \
--publish [$(tailscale ip -4)]:8443:8443 \
--publish [$(tailscale ip -4)]:8443:8443/udp \
2024-11-23 12:26:34 -05:00
--publish [$(tailscale ip -6)]:8443:8443 \
--publish [$(tailscale ip -6)]:8443:8443/udp \
2023-09-05 11:40:31 -04:00
--network pew-net \
customcaddy:latest
}
down () {
docker stop caddy || true
docker rm caddy || true
}
logs () {
docker logs --follow caddy
}
$@