867c0e5e1fe2a5e0434df5eda68fdde135483cd7 — Andrew Zah 3 months ago 00ebcc7
update docker builds
4 files changed, 23 insertions(+), 6 deletions(-)

M Caddyfile
M Dockerfile
M docker-compose.yml
A templates/robots.txt
M Caddyfile => Caddyfile +10 -0
@@ 4,5 4,15 @@ default_max_age 10m
    }
  
+   git {
+     hook /site-webhook {%SITE_WEBHOOK%}
+     repo https://github.com/azah/personal-site-public.git
+     branch master
+     clone_args --recurse-submodules
+     pull_args --recurse-submodules
+     interval 86400
+     hook_type github
+   }
+ 
    root /www/public
  }

M Dockerfile => Dockerfile +5 -6
@@ 5,9 5,10 @@ # Caddy
  RUN adduser -S caddy
  
- ARG plugins=http.cache,tls.dns.gandi
+ ARG plugins=http.git,http.cache,tls.dns.gandi
  
  RUN apk add --no-cache --virtual .build-caddy openssh-client tar curl \
+   && apk add --no-cache git \
    && curl --silent --show-error --fail --location \
    --header "Accept: application/tar+gzip, application/x-zip, application/octet-stream" -p \
    "https://caddyserver.com/download/linux/amd64?plugins=${plugins}&license=personal&telemetry=off" \


@@ 16,14 17,12 @@ && apk del --purge .build-caddy
  
  RUN /usr/bin/caddy --plugins
+ RUN mkdir /www \
+   && chown -R caddy /www
  
- # Gutenberg
- 
- COPY public/ /www/public
+ # caddy
  COPY Caddyfile /etc/Caddyfile
  
- WORKDIR /www/public
- 
  USER caddy
  ENTRYPOINT ["/usr/bin/caddy"]
  CMD ["--conf", "/etc/Caddyfile", "--log", "stdout", "-agree"]

M docker-compose.yml => docker-compose.yml +2 -0
@@ 8,3 8,5 @@ image: andrewzah/personal_site
      ports:
        - "1111:1111"
+     env_file:
+       - ".env"

A templates/robots.txt => templates/robots.txt +6 -0
@@ 0,0 1,6 @@
+ User-agent: BLEXBot
+ Disallow: /
+ 
+ User-agent: *
+ Disallow:
+ Sitemap: andrewzah.com/sitemap.xml