add links

master
Paul Walko 2023-10-29 18:41:45 -04:00
parent d6ab7a54ff
commit 38f49dd3b4
4 changed files with 89 additions and 0 deletions

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

32
links/docker/caddy.sh Executable file
View File

@ -0,0 +1,32 @@
#!/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 $HOME/scripts-private/links/Caddyfile:/etc/caddy/Caddyfile:ro \
--volume /subway/caddy/data:/data:rw \
--publish $(tailscale ip -4):443:443 \
--network pew-net \
customcaddy:latest
}
down () {
docker stop caddy || true
docker rm caddy || true
}
logs () {
docker logs --follow caddy
}
$@

25
links/docker/jenkins.sh Executable file
View File

@ -0,0 +1,25 @@
#!/bin/bash
set -e
up () {
# Exposted on 8080 in pew-net
docker run \
--detach \
--name jenkins \
--restart unless-stopped \
--volume /subway/jenkins/jenkins_home:/var/jenkins_home:rw \
--network pew-net \
jenkins/jenkins:lts
}
down () {
docker stop jenkins || true
docker rm jenkins || true
}
logs () {
docker logs --follow jenkins
}
$@

23
links/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.4.0 --interval 1800
}
down () {
docker stop watchtower || true
docker rm watchtower || true
}
logs () {
docker logs --follow watchtower
}
$@