From: Damian Myrda Date: Tue, 10 Sep 2024 12:42:58 +0000 (-0500) Subject: Added git X-Git-Url: http://git.prime8.dev/?a=commitdiff_plain;h=e2d379dd1dbe1fd35763af5cee5e61f022466f10;p=p8d.git Added git --- diff --git a/Dockerfile b/Dockerfile index 03aae85..c9215bc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,14 @@ -FROM ghcr.io/getzola/zola:v0.19.1 AS builder - +FROM ghcr.io/getzola/zola:v0.19.2 AS web COPY ./web/ /src/ WORKDIR /src/ - RUN ["zola", "build"] -FROM caddy:latest +FROM caddy:builder AS caddy +RUN xcaddy build \ + --with github.com/caddyserver/cache-handler +FROM caddy:latest +COPY --from=caddy /usr/bin/caddy /usr/bin/caddy COPY ./caddy /etc/caddy/Caddyfile -COPY --from=builder /src/public/ /web/ - +COPY --from=web /src/public/ /web/ EXPOSE 80 443 diff --git a/caddy b/caddy index 97556ec..345ccc3 100644 --- a/caddy +++ b/caddy @@ -1,7 +1,12 @@ +{ + cache +} + prime8.dev { root * /web/ file_server try_files {path} {path}.html + cache handle_errors { @404 { @@ -17,3 +22,10 @@ prime8.dev { mail.prime8.dev { tls damian@prime8.dev } + +git.prime8.dev { + reverse_proxy http://git:80 + cache + + tls damian@prime8.dev +} diff --git a/compose.yml b/compose.yml index b33491e..226e2c1 100644 --- a/compose.yml +++ b/compose.yml @@ -17,7 +17,7 @@ services: - /var/run/docker.sock:/var/run/docker.sock command: - "--interval" - - "60" + - "120" - "--rolling-restart" - "--cleanup" restart: always @@ -61,5 +61,16 @@ services: - NET_ADMIN restart: always + git: + container_name: git + image: woahbase/alpine-cgit:latest + expose: + - "80" + volumes: + - ./git/:/srv/git + networks: + - common + restart: always + networks: common: