38 lines
797 B
Bash
38 lines
797 B
Bash
|
#!/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 \
|
||
|
--privileged \
|
||
|
--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 \
|
||
|
--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
|
||
|
}
|
||
|
|
||
|
$@
|