Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ COPY vite.config.ts index.html tsconfig.json tsconfig.app.json tsconfig.node.jso
COPY public /website/public
COPY src /website/src

ARG VITE_API_URL=/api
ARG VITE_ORY_URL=/auth

ENV VITE_API_URL=$VITE_API_URL
ENV VITE_ORY_URL=$VITE_ORY_URL

# Now build for optimal caching
RUN pnpm run build

Expand Down
43 changes: 43 additions & 0 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ server {
server_tokens off;
absolute_redirect off;

resolver 127.0.0.11 ipv6=off valid=10s;

gzip on;
gzip_vary on;
gzip_comp_level 6;
Expand All @@ -40,6 +42,47 @@ server {
try_files $uri =404;
}

location /auth/ {
set $up_kratos http://kratos:4433;
rewrite ^/auth/(.*)$ /$1 break;
proxy_pass $up_kratos;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_hide_header Cache-Control;
add_header Cache-Control $upstream_http_cache_control always;
}

location /api/ {
set $up_kanae http://kanae:8000;
rewrite ^/api/(.*)$ /$1 break;
proxy_pass $up_kanae;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_hide_header Cache-Control;
add_header Cache-Control $upstream_http_cache_control always;
}

location ~ ^/(kanae-media|kanae-public)/ {
set $up_garage http://garage:3900;
proxy_pass $up_garage;
proxy_set_header Host $http_host;
client_max_body_size 0;
proxy_request_buffering off;
proxy_hide_header Cache-Control;
add_header Cache-Control $upstream_http_cache_control always;
}

location /public/ {
set $up_garage_web http://garage:3902;
rewrite ^/public/(.*)$ /$1 break;
proxy_pass $up_garage_web;
proxy_set_header Host kanae-public.web.garage.localhost;
proxy_hide_header Cache-Control;
add_header Cache-Control $upstream_http_cache_control always;
}

location / {
try_files $uri $uri/ /index.html;
}
Expand Down