From e6d0eb9432277a281375d4c0f2cdd8d885700f2c Mon Sep 17 00:00:00 2001 From: Daniel Savosin Date: Sun, 8 Sep 2024 17:30:04 +0700 Subject: [PATCH] improve docker --- Dockerfile | 2 +- templates/default.conf.template | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 348c00d..e5e82e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ARG NGINX_VERSION=1.27.1 FROM nginx:${NGINX_VERSION}-alpine -ENV LINK_PREFIX="" +ENV LINK_PATH="/" COPY css /opt/litterlink/css COPY fonts /opt/litterlink/fonts diff --git a/templates/default.conf.template b/templates/default.conf.template index f3fb22d..5b2c24b 100644 --- a/templates/default.conf.template +++ b/templates/default.conf.template @@ -1,8 +1,8 @@ server { listen 80; - location ~ ^$LINK_PREFIX/$ { - root /opt/litterlink/; - try_files /index.html =404; + location $LINK_PATH { + alias /opt/litterlink; + index index.html; } }