Skip to content

Commit

Permalink
fixed deployment issues
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Mar 26, 2023
1 parent e5de547 commit b4b1266
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
8 changes: 7 additions & 1 deletion webclient/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ RUN npm install && \
apt-get update && \
apt-get install rsync -y

COPY . .
COPY build.sh build.sh
COPY env env
COPY *.json ./
COPY *.ts ./
COPY public public
COPY *.html ./
COPY src src
RUN sh build.sh

FROM nginx:latest as production-stage
Expand Down
16 changes: 7 additions & 9 deletions webclient/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -113,23 +113,21 @@ http {
proxy_pass https://rendertron.navigatum-scv.svc.cluster.local/rendertron/render/https://nav.tum.de$request_uri;
}

location ^~ / {
# disable caching
add_header Cache-Control no-cache;
# 360s=5min
expires 360s;
try_files /$THEME-$LANG.html /404.html;
location / {
add_header Cache-Control no-cache; # disable caching, as we do not want to have theme/language related issues
expires 360s; # 360s=5min
try_files /$LANG-$THEME.html /404.html;
}

location ^~ /assets/ {
location /assets/ {
access_log off;
expires 360d;
expires 10d;
add_header Cache-Control "public";
access_log off;
try_files $uri /404.html;
}

location ^~ /.well-known/ {
location /.well-known/ {
access_log off;
try_files $uri /404.html;
}
Expand Down

0 comments on commit b4b1266

Please sign in to comment.