From d40170cfad5985920fdc204f602bd0a91af8834c Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Mon, 9 Feb 2026 15:22:57 +0300 Subject: [PATCH] fix: caddy setup in dockerfile --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index ad50ab8..edf3f20 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,9 +18,10 @@ WORKDIR /usr/share/caddy # Copy built static files from the builder stage COPY --from=builder /app/dist . -# Expose the port Caddy will listen on +# Copy our local Caddyfile config +COPY Caddyfile /etc/caddy/Caddyfile + EXPOSE 3000 -# Start Caddy as a file server with SPA support -# It serves files from the current dir and redirects unknown paths to index.html -CMD ["caddy", "file-server", "--listen", ":3000", "--try-files", "index.html"] +# Start caddy using the config file +CMD ["caddy", "run", "--config", "/etc/caddy/Caddyfile", "--adapter", "caddyfile"]