[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 FROM nginx:${NGINX_VERSION}-alpine
ENV LINK_PREFIX=""
COPY css /opt/litterlink/css COPY css /opt/litterlink/css
COPY fonts /opt/litterlink/fonts COPY fonts /opt/litterlink/fonts
COPY images /opt/litterlink/images COPY images /opt/litterlink/images

View File

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