From 1caf81cf573581228396555153622640fcceca07 Mon Sep 17 00:00:00 2001 From: Fabien BOURGEOIS Date: Mon, 21 Feb 2022 14:35:06 +0100 Subject: [PATCH] [IMP]Caddy common snippets --- caddy/Dockerfile | 2 ++ caddy/common | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 caddy/common diff --git a/caddy/Dockerfile b/caddy/Dockerfile index 37e0683..165da8b 100644 --- a/caddy/Dockerfile +++ b/caddy/Dockerfile @@ -6,3 +6,5 @@ RUN xcaddy build \ FROM caddy:2 COPY --from=builder /usr/bin/caddy /usr/bin/caddy + +COPY common /caddycommon diff --git a/caddy/common b/caddy/common new file mode 100644 index 0000000..d26fd91 --- /dev/null +++ b/caddy/common @@ -0,0 +1,19 @@ +# Common snippets + +(global) { + grace_period 5s + log http.log.access { + include http.log.access + output stdout + level INFO + format formatted "[{ts}] {request>remote_addr} {request>headers>X-Forwarded-For} {request>method} {request>host}{request>uri} {status} {request>headers>User-Agent} {request>headers>Referer}" { + time_format "02/Jan/2006:15:04:05-0700" + } + } +} + +(odoo) { + reverse_proxy {args.0}:8069 + reverse_proxy /longpolling/* {args.0}:8072 + encode zstd gzip +}