In the Coolify app, there's an issue when building a Next.js application using Nixpacks. If the Next.js app has a nested app folder, like /app/app, intended for routing to https://url/app, Nixpacks incorrectly points to the subfolder instead of the main folder. This misconfiguration results in the failure to check the health status of the application. If this is an issue with Nixpacks directly, please close the issue and i'll create one at their repo. I was able to fix this by creating a route group like app/(routetoapp)/app.
Minimal Reproduction (if possible, example repository)
Create a Next.js project with the new app router.
Inside the main app folder, create a subfolder also named app (i.e., /app/app).
Deploy the application using Coolify and Nixpacks.
Description
In the Coolify app, there's an issue when building a Next.js application using Nixpacks. If the Next.js app has a nested app folder, like /app/app, intended for routing to https://url/app, Nixpacks incorrectly points to the subfolder instead of the main folder. This misconfiguration results in the failure to check the health status of the application. If this is an issue with Nixpacks directly, please close the issue and i'll create one at their repo. I was able to fix this by creating a route group like app/(routetoapp)/app.
Minimal Reproduction (if possible, example repository)
Exception or Error
It fails the healthcheck.
Version
v4.0.0-beta.294