From 2ec9d646e342c79c4957358d80c3bd201ab2e60b Mon Sep 17 00:00:00 2001 From: Henit Chobisa Date: Tue, 22 Aug 2023 10:10:32 +0000 Subject: [PATCH] chore: added asset prefix for loading static assets with /space/ asset prefix --- apps/space/next.config.js | 1 + docker-compose.yml | 3 +++ nginx/nginx.conf.template | 3 --- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/space/next.config.js b/apps/space/next.config.js index 4128b636a..f999b6c17 100644 --- a/apps/space/next.config.js +++ b/apps/space/next.config.js @@ -2,6 +2,7 @@ const path = require("path"); const nextConfig = { + assetPrefix: '/spaces/', reactStrictMode: false, swcMinify: true, experimental: { diff --git a/docker-compose.yml b/docker-compose.yml index 07aa79f36..71745a465 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -69,10 +69,13 @@ services: NEXT_PUBLIC_API_BASE_URL: http://localhost:8000 restart: always command: /usr/local/bin/start.sh apps/space/server.js space + expose: + - 4000 env_file: - .env environment: NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL} + PORT: 4000 depends_on: - plane-api - plane-worker diff --git a/nginx/nginx.conf.template b/nginx/nginx.conf.template index ee21c97e5..49e0af18d 100644 --- a/nginx/nginx.conf.template +++ b/nginx/nginx.conf.template @@ -16,10 +16,7 @@ server { } location /spaces/ { - rewrite ^/spaces/(.*)$ /$1 break; proxy_pass http://planedeploy:4000/; - sub_filter 'http://localhost/_next/static/' 'http://localhost/spaces/_next/static/'; - sub_filter_once off; } location /api/ {