From 2f49b8846c4fa59b2737ecf8a40cebf746cae5a6 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 16 Jan 2022 22:04:02 +0100 Subject: [PATCH] caddy: follow upstream example, use /srv dir for serving static files --- Caddyfile | 6 ++++-- Dockerfile | 2 +- shell.nix | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Caddyfile b/Caddyfile index 630fde0..dd3c88f 100644 --- a/Caddyfile +++ b/Caddyfile @@ -6,7 +6,9 @@ } } +# static file server miom.space { - root * /var/www/miom.space - file_server + root * /srv/miom.space + file_server +} } diff --git a/Dockerfile b/Dockerfile index 24b0e00..58adfcd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,5 +8,5 @@ RUN ./build.sh FROM caddy:2.4.6-alpine -COPY --from=build-stage /app/_site /var/www/miom.space/ +COPY --from=build-stage /app/_site /srv/miom.space/ COPY --from=build-stage /app/Caddyfile /etc/caddy/Caddyfile diff --git a/shell.nix b/shell.nix index 48f721e..399bd4e 100644 --- a/shell.nix +++ b/shell.nix @@ -1,6 +1,7 @@ { pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/feed45d391471db2ecdbe5ba7aa301ab290a0c8f.tar.gz") {}, nightingale-pkgs ? import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/f7949198dcff52265b322ca8abf7450610e7e49e.tar.gz") {} }: + pkgs.mkShell { buildInputs = [ nightingale-pkgs.docker-compose