diff --git a/.editorconfig b/.editorconfig index 3af1aa2..be25b4c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,3 +6,6 @@ trim_trailing_whitespace = true charset = utf-8 indent_style = space indent_size = 2 + +[nginx.conf] +indent_size = 4 diff --git a/Dockerfile b/Dockerfile index 8e36a13..97f94c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,4 +10,5 @@ RUN npm run build FROM nginx:alpine -COPY --from=builder /app/dist /usr/share/nginx/html +COPY --from=builder /app/dist /usr/share/comfycamp +COPY nginx.conf /etc/nginx/conf.d/default.conf diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..51fbf62 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,12 @@ +server { + root /usr/share/comfycamp; + error_page 404 /404.html; + + location ~ \.(png|ico|svg|ttf|webp)$ { + add_header Cache-Control "public, max-age=86400"; + } + + location / { + index index.html index.htm; + } +} diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index d2efab1..2b8584d 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -1,6 +1,6 @@