]> prime8.dev >> repos - p8d.git/commitdiff
Added git
authorDamian Myrda <monkey.damianek@gmail.com>
Tue, 10 Sep 2024 12:42:58 +0000 (07:42 -0500)
committerDamian Myrda <monkey.damianek@gmail.com>
Tue, 10 Sep 2024 12:44:57 +0000 (07:44 -0500)
Dockerfile
caddy
compose.yml

index 03aae85fd8df5cd6d5a16c83954fb6147990ae0f..c9215bc555e6998f12995528e16f3850caa1a6cd 100644 (file)
@@ -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 97556eccf229d408355681749e2f42c688ea13e3..345ccc3948d3e32414119ab59307cfc51b2cddbd 100644 (file)
--- 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
+}
index b33491e6b95acccd4c342f6726e3327acb1259f1..226e2c17eb24b504956c75a54d830c7c3fdcf06e 100644 (file)
@@ -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: