[docker] allow use path prefix

This commit is contained in:
2024-09-08 16:02:42 +07:00
parent 560d6c7203
commit 68df7076c1
2 changed files with 6 additions and 4 deletions

View File

@@ -2,6 +2,8 @@ ARG NGINX_VERSION=1.27.1
FROM nginx:${NGINX_VERSION}-alpine
ENV LINK_PREFIX=""
COPY css /opt/litterlink/css
COPY fonts /opt/litterlink/fonts
COPY images /opt/litterlink/images

View File

@@ -1,8 +1,8 @@
server {
listen 80;
location / {
root /opt/litterlink;
index index.html;
location ~ ^$LINK_PREFIX/$ {
root /opt/litterlink/;
try_files /index.html =404;
}
}