switch from nginx to caddy

master
Paul Walko 2022-09-25 15:24:41 -04:00
parent 2f680fcbaf
commit 696056e06c
2 changed files with 30 additions and 42 deletions

30
fogcutter/docker/caddy.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
set -e
up () {
docker network create pew-net || true
# main caddy container
docker run \
--detach \
--name caddy \
--restart unless-stopped \
--volume /bigdata/k8s-config/caddy/Caddyfile:/etc/caddy/Caddyfile:ro \
--volume /bigdata/k8s-config/caddy/data:/data:rw \
--publish 80:80 \
--publish 443:443 \
--network pew-net \
docker.io/caddy:2.6.1
}
down () {
docker stop caddy || true
docker rm caddy || true
}
logs () {
docker logs --follow caddy
}
$@

View File

@ -1,42 +0,0 @@
#!/bin/bash
set -e
up () {
docker network create pew-net || true
# main nginx container
# for local access hard-code IP in /etc/hosts
docker run \
--detach \
--name nginx \
--restart unless-stopped \
--env PUID=1000 \
--env GUID=1000 \
--env TZ=US/Eastern \
--env URL=seaturtle.pw \
--env VALIDATION=http \
--env EMAIL=paul@bigcavemaps.com \
--env SUBDOMAINS=cave,ff,git,jf,nc,plex \
--env EXTRA_DOMAINS=paul.walko.org,mp.bigcavemaps.com,tile.bigcavemaps.com \
--volume /bigdata/k8s-config/nginx/nginx.conf:/config/nginx/nginx.conf:ro \
--volume /bigdata/files:/files:ro \
--volume /bigdata/k8s-config/nginx/config:/config:rw \
--volume /bigdata/k8s-config/nginx/ssl.conf:/config/nginx/ssl.conf:ro \
--volume /bigdata/k8s-config/nginx/site-confs:/config/nginx/site-confs:ro \
--publish 80:80 \
--publish 443:443 \
--network pew-net \
ghcr.io/linuxserver/swag:latest
}
down () {
docker stop nginx || true
docker rm nginx || true
}
logs () {
docker logs --follow nginx
}
$@