scripts/lech/docker/caddy.sh

40 lines
941 B
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 \
2023-12-02 09:44:19 -05:00
--volume /mammoth/archive/vpicc/public:/www/files/bigcavemaps.com/vpicc:ro \
--volume /mammoth/files/seaturtle.pw:/www/files/seaturtle.pw:ro \
--volume /mammoth/gis/bigcavemaps.com:/www/gis/bigcavemaps.com:ro \
2023-09-05 11:40:31 -04:00
--volume /mammoth/gis/source:/gis/source: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 \
2023-09-05 11:40:31 -04:00
--publish 80:80 \
--publish 443:443 \
--publish 443:443/udp \
--network pew-net \
customcaddy:latest
}
down () {
docker stop caddy || true
docker rm caddy || true
}
logs () {
docker logs --follow caddy
}
$@