Adapt Caddyfile during the build.

Until https://github.com/ss098/certmagic-s3/pull/25 is merged, this
also uses a fork of certmagic-s3.
This commit is contained in:
Catherine
2025-09-19 22:12:48 +00:00
parent 859c4bef77
commit da604215c1
3 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -15,10 +15,10 @@
}
storage s3 {
host "{$S3_ENDPOINT}"
access_id "{$S3_ACCESS_KEY_ID}"
secret_key "{$S3_SECRET_ACCESS_KEY}"
bucket "{$S3_BUCKET}"
host "{env.S3_ENDPOINT}"
access_id "{env.S3_ACCESS_KEY_ID}"
secret_key "{env.S3_SECRET_ACCESS_KEY}"
bucket "{env.S3_BUCKET}"
prefix "ssl"
}
+1 -1
View File
@@ -12,5 +12,5 @@ autorestart = true
command = /bin/git-pages
[program:caddy]
command = /bin/caddy run
command = /bin/caddy run -c caddy.json
depends_on = pages
+3 -3
View File
@@ -15,10 +15,10 @@ let
caddy' =
(caddy.withPlugins {
plugins = [
"github.com/ss098/certmagic-s3@v0.0.0-20250808023250-9788b7231c87"
"github.com/ss098/certmagic-s3=github.com/whitequark/certmagic-s3@v0.0.0-20250919212902-21ac26c15951"
];
hash = "sha256-jZer6cBnE2Vo5/kMG+1vZBwWY8P/V1Lb33TA3Suz4pI=";
hash = "sha256-Mx+jSvjNt6y7mK4aP/YERmCPWx5UTGTyH2dbXUJ9+UY=";
}).overrideAttrs
(oldAttrs: {
buildInputs = with pkgsStatic; [
@@ -49,7 +49,7 @@ dockerTools.buildImage {
mkdir /bin
cp ${self}/config.toml.example /app/config.toml
cp ${self}/conf/Caddyfile /app/Caddyfile
${caddy'}/bin/caddy adapt --config ${self}/conf/Caddyfile >/app/caddy.json
cp ${self}/conf/supervisord.conf /app/supervisord.conf
cp ${caddy'}/bin/caddy /bin/caddy