35 lines
646 B
Bash
Executable File
35 lines
646 B
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 $HOME/scripts-private/wind/Caddyfile:/etc/caddy/Caddyfile:ro \
|
|
--volume /bigdata/caddy/data:/data:rw \
|
|
--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
|
|
}
|
|
|
|
$@
|