wind docker

master
Paul Walko 2023-12-02 09:40:33 -05:00
parent e899c7b4d1
commit 609a0d3997
5 changed files with 106 additions and 0 deletions

2
wind/docker/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
CaverEveryHour/
*.env

View File

@ -0,0 +1,9 @@
FROM caddy:2.7.4-builder AS builder
RUN xcaddy build \
--with github.com/caddy-dns/porkbun \
--with github.com/caddyserver/replace-response
FROM caddy:2.7.4
COPY --from=builder /usr/bin/caddy /usr/bin/caddy

34
wind/docker/caddy.sh Executable file
View File

@ -0,0 +1,34 @@
#!/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
}
$@

38
wind/docker/plex.sh Executable file
View File

@ -0,0 +1,38 @@
#!/bin/bash
set -e
up () {
docker network create pew-net || true
# Exposed on port 32400 in pew-net
docker run \
--detach \
--name plex \
--restart unless-stopped \
--env PUID=1000 \
--env PGID=1000 \
--env PLEX_CLAIM=claim-rQJqKnhLEPWJS8hH16jU \
--env VERSION=docker \
--device /dev/dri:/dev/dri:rw \
--volume /bigdata/plex/config:/config:rw \
--volume /bigdata/media/homemedia:/media/homemedia:ro \
--volume /bigdata/media/audiobooks:/media/audiobooks:ro \
--volume /bigdata/media/movies:/media/movies:ro \
--volume /bigdata/media/music:/media/music:ro \
--volume /bigdata/media/radio:/media/radio:ro \
--volume /bigdata/media/tv:/media/tv:ro \
--network host \
ghcr.io/linuxserver/plex:latest
}
down () {
docker stop plex || true
docker rm plex || true
}
logs () {
docker logs --follow plex
}
$@

23
wind/docker/watchtower.sh Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
set -e
up () {
# Poll interval: 1800s (30 mins)
docker run \
--detach \
--name watchtower \
--volume /var/run/docker.sock:/var/run/docker.sock:rw \
ghcr.io/containrrr/watchtower:amd64-1.7.1 --interval 1800
}
down () {
docker stop watchtower || true
docker rm watchtower || true
}
logs () {
docker logs --follow watchtower
}
$@