35 lines
690 B
Bash
Executable File
35 lines
690 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
up () {
|
|
docker network create pew-net || true
|
|
|
|
# main caddy container
|
|
docker run \
|
|
--detach \
|
|
--name caddy \
|
|
--restart unless-stopped \
|
|
--privileged \
|
|
--volume /bigdata/k8s-config/caddy/Caddyfile:/etc/caddy/Caddyfile:ro \
|
|
--volume /bigdata/k8s-config/caddy/data:/data:rw \
|
|
--volume /bigdata/gis/bigcavemaps.com:/www/bigcavemaps.com:ro \
|
|
--volume /bigdata/files:/www/seaturtle.pw_files:ro \
|
|
--publish 80:80 \
|
|
--publish 443:443 \
|
|
--publish 443:443/udp \
|
|
--network pew-net \
|
|
docker.io/caddy:2.6.2
|
|
}
|
|
|
|
down () {
|
|
docker stop caddy || true
|
|
docker rm caddy || true
|
|
}
|
|
|
|
logs () {
|
|
docker logs --follow caddy
|
|
}
|
|
|
|
$@
|