scripts/lech/docker/caddy.sh

42 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
set -e
up () {
docker network create pew-net || true
# main caddy container
docker build -t customcaddy:latest -f Dockerfile.caddy .
docker run \
--detach \
--name caddy \
--restart unless-stopped \
--label com.centurylinklabs.watchtower.enable=false \
--privileged \
--volume /mammoth/archive/vpicc/public:/www/files/bigcavemaps.com/vpicc:ro \
--volume /mammoth/archive/websites/wacz:/www/files/bigcavemaps.com/websites:ro \
--volume /mammoth/files/seaturtle.pw:/www/files/seaturtle.pw:ro \
--volume /mammoth/gis/bigcavemaps.com:/www/gis/bigcavemaps.com:ro \
--volume /mammoth/gis/source:/gis/source: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 \
--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
}
$@