chore: added asset prefix for loading static assets with /space/ asset prefix

This commit is contained in:
Henit Chobisa 2023-08-22 10:10:32 +00:00
parent 82cc1f0ed8
commit 2ec9d646e3
3 changed files with 4 additions and 3 deletions

View File

@ -2,6 +2,7 @@
const path = require("path");
const nextConfig = {
assetPrefix: '/spaces/',
reactStrictMode: false,
swcMinify: true,
experimental: {

View File

@ -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

View File

@ -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/ {