From 696056e06c0efebb1c2cc8c8f28eafc8e2bedb65 Mon Sep 17 00:00:00 2001 From: Paul Walko Date: Sun, 25 Sep 2022 15:24:41 -0400 Subject: [PATCH] switch from nginx to caddy --- fogcutter/docker/caddy.sh | 30 ++++++++++++++++++++++++++++ fogcutter/docker/nginx.sh | 42 --------------------------------------- 2 files changed, 30 insertions(+), 42 deletions(-) create mode 100755 fogcutter/docker/caddy.sh delete mode 100755 fogcutter/docker/nginx.sh diff --git a/fogcutter/docker/caddy.sh b/fogcutter/docker/caddy.sh new file mode 100755 index 0000000..12d7103 --- /dev/null +++ b/fogcutter/docker/caddy.sh @@ -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 +} + +$@ diff --git a/fogcutter/docker/nginx.sh b/fogcutter/docker/nginx.sh deleted file mode 100755 index bd65c4e..0000000 --- a/fogcutter/docker/nginx.sh +++ /dev/null @@ -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 -} - -$@