Containerize site and serve with caddy

This commit is contained in:
2025-12-26 15:31:47 +01:00
parent aee2e22ace
commit d763d3580f
2 changed files with 21 additions and 0 deletions

4
Caddyfile Normal file
View File

@@ -0,0 +1,4 @@
:80 {
root * /srv
file_server
}

17
Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
# Use official Caddy image
FROM caddy:2-alpine
# Copy Caddy configuration
COPY Caddyfile /etc/caddy/Caddyfile
# Copy static site files
COPY css /srv/css
COPY en /srv/en
COPY no /srv/no
COPY index.html /srv
# Expose HTTP port
EXPOSE 80
# Explicitly run Caddy
CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]