404 main page not found
I deployed a docker file that contains multiple services and express app that serves react is one of them.
When I try to access the main webpage, I get 404 with following logs in the deployment
I tried to set the
Caddyfile
and nixpacks.toml
files based on this repo here
https://github.com/brody192/vite-react-template/blob/main/nixpacks.toml to no luck
https://popspace-demo-production.up.railway.app/GitHub
vite-react-template/nixpacks.toml at main · brody192/vite-react-tem...
Contribute to brody192/vite-react-template development by creating an account on GitHub.
9 Replies
Project ID:
N/A
are you able to share your repo?
sure, here it is
https://github.com/OlegGulevskyy/popspace-demo
it's a fork from this basically
https://github.com/with-labs/popspace
the ui package from my understanding is here
https://github.com/OlegGulevskyy/popspace-demo/tree/master/noodle
and that's where I placed the files
looks like you are using the wrong caddyfile and nixpacks.toml combo -
https://github.com/brody192/create-react-app-starter
use the files from this repo.
and make sure you have the root directory set to
/noodle
in your service settings.ah that's true, I can see in Caddyfile I was pointing to
dist
folder, that's gotta be causing some troubles at the very least
gonna try now
hm, without setting /noodle
as a root directory leads to the same issue
but with setting /noodle
as a root directory I am getting a bunch of errors
not actually sure where the RUN
is from that "causes" the error, it's Railway's docker file?you need the root directory to be set to
/noodle
since that's the app you are trying to deploy, you'll need to deploy all the app's separately
your lock file needs to be updatedi am back on this topic, the issue is that when using suggested Caddy files and nix toml it brings a lot of problems during deployment that I am not sure I am able to solve, when I am getting Not found, at least I am able to build the project fine and I can see that the logs are normal, like the deployment is happening
https://popspace-demo-production.up.railway.app/
however, I also have couple of other ports that are supposed to be available - backend, and none of them are responsive
for example
so it seems like there is a bigger problem than just UI not rendering correctly, none of my services are not working at all
whereas I tried to deploy it Fly.io and I got opposite almsot 😄 I get the UI working but the backends impossible to make work
well actually I cannot even deploy separately these services, when I try to deploy the UI service, it errors out while trying to import other serivces, because it's trying to find them in the global registry instead of from workspace
you can't access specific ports, you need to deploy each app individually
and noodle comes with its own server, so you don't even need the Caddyfile and nixpacks.toml