Replies: 12 comments
-
|
I don't understand the problem. If you have a |
Beta Was this translation helpful? Give feedback.
-
|
Ill elaborate on the issue. I have 3 application on the server: This are not PAGES. Each path being routes to 3 different containers using an nginx reverse proxy. Thats allows me to have multiple apps running on a single server and accessible rasily behind a single nginx. I want to have https://sub.domain.com/splitpro. Problem is if the nginx redirect this url to the splitpro container, it wont work since it expected to recieve non relative paths In this project. We can add baseUrl to the nextJS config, but then we have to rebuild it. I would like to have an environment variable thats changed the basePath when the container starts. This is a very common problem and most web project have such variable so we dont have to invent the wheel here, just make sure it is integrated correctly. Example of nginx proxy (so its easier to understand): |
Beta Was this translation helpful? Give feedback.
-
|
Subpath routing is also possible out of the box. It's been a while since I used nginx, but maybe try removing the trailing slashes in your config, so it's like |
Beta Was this translation helpful? Give feedback.
-
This will definitely work for the first request. Problem is - if the page has a link to another resource, it will try to fetch it relative to / and will no longer reach the correct location tag. The internal wrb server must be aware of the subpath |
Beta Was this translation helpful? Give feedback.
-
|
Did you add the base path to the |
Beta Was this translation helpful? Give feedback.
-
NextAuth isn't relevant to this feature. just to make sure I'm not missing anything - i did change it, obviously it had no relevant effect. My feature request is about the web server itself. nextauth is just about authentication and its really no the issue here. NextJS natively supports that with basePath but only in build time (npm build). if ill use the basePath solution i would be able to receive updates from docker hub since ill have to build the docker myself. which is a bummer in terms of maintenance. This is a famous problem around the internet, I'm no inventing the wheel here. Some have acceptable solutions but the root issue is NextJS is too simple for proper web apps and does not support simply supports this like other frameworks. i don't really mind what's the solution but i cannot host this project until there is one since i only have a single subdomain. Thank you for the attention anyway, appreciated. |
Beta Was this translation helpful? Give feedback.
-
|
You're right, I also did some reading and seems like a major NextJS bummer. |
Beta Was this translation helpful? Give feedback.
-
|
The solutions i can think of are:
I think the first solution has many advantages since the project isn't static anyway (like SSR and such). I'll continue to watch for a while to see if it is fixed. thank you. |
Beta Was this translation helpful? Give feedback.
-
|
Well I hope I don't have to explain why both of these are a no go for me as for now. Let's hope that Vercel ships a more proxy friendly solution, but sadly self hosting does not really fit their business model. |
Beta Was this translation helpful? Give feedback.
-
|
i slept on it, i realized that maybe building the docker myself isn't too bad. I think i will have the confident to build it myself if we can change the building to a single I'll be happy to change everything myself or help with it if we can make sure that we keep this in future version, waiting for your approval. Semi-related: Does the project have an update notification somewhere? what is the proper solution to making sure I'm using the latest version. Again, thank you for being so cooperative. Eventually we have to win SplitWise the evil devil... |
Beta Was this translation helpful? Give feedback.
-
|
Sorry for the delayed response. Regarding the compose file, why not just copy it to the root of your project and slightly modify it: name: split-pro-prod
services:
postgres:
image: postgres:16
container_name: ${POSTGRES_CONTAINER_NAME:-splitpro-db}
restart: always
environment:
- POSTGRES_USER=${POSTGRES_USER:?err}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:?err}
- POSTGRES_DB=${POSTGRES_DB:?err}
- POSTGRES_PORT=${POSTGRES_PORT:-5432}
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}']
interval: 10s
timeout: 5s
retries: 5
volumes:
- database:/var/lib/postgresql/data
splitpro:
build: . # <--- This will automatically build a local image
container_name: splitpro
restart: always
ports:
- ${PORT:-3000}:${PORT:-3000}
environment:
- PORT=${PORT:-3000}
- HOSTNAME=0.0.0.0
depends_on:
postgres:
condition: service_healthy
volumes:
database:The No notification sadly, you can add submit a PR with a check for that if you'd like. Otherwise just star the repo and visit Github from time to time and you'll see the releases on your dashboard. |
Beta Was this translation helpful? Give feedback.
-
|
@dkgs2000 #444 added a debug info display that also checks if there is a new version available :) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Maybe it would be better as discussion? Please describe.
when hosting multiple web applications under a single domain, the / path is taken by a single app
Describe the solution you'd like
Would like to configure an external nginx reverse proxy for /splitpro to go into the splitpro web container.
Describe alternatives you've considered
im already using a subdomain.
Making nginx change url prefixes break web resources paths
App version
Latest
Beta Was this translation helpful? Give feedback.
All reactions