Skip to content

Commit

Permalink
Switched blog file server from nginx to caddy
Browse files Browse the repository at this point in the history
  • Loading branch information
lrotermund committed Oct 14, 2024
1 parent f3a2c75 commit cbc888f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 54 deletions.
14 changes: 4 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@ WORKDIR /site
RUN /hugo --minify --enableGitInfo

# stage 2
FROM nginx:alpine
FROM caddy:alpine

WORKDIR /usr/share/nginx/html/
COPY _docker/Caddyfile /etc/caddy/Caddyfile

# clean the default public folder
RUN rm -fr * .??*
WORKDIR /var/www/html

COPY _docker/nginx.conf /etc/nginx/nginx.conf
COPY _docker/conf.d/ /etc/nginx/conf.d/

RUN chmod 0644 /etc/nginx/nginx.conf /etc/nginx/conf.d/*

COPY --from=build /site/public /usr/share/nginx/html
COPY --from=build /site/public /var/www/html
7 changes: 7 additions & 0 deletions _docker/Caddyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:80 {
file_server

header {
-Server
}
}
24 changes: 0 additions & 24 deletions _docker/conf.d/expires.inc

This file was deleted.

20 changes: 0 additions & 20 deletions _docker/nginx.conf

This file was deleted.

0 comments on commit cbc888f

Please sign in to comment.