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 +}