How do I get nginx on prod stack to serve a built app?

Hello,
I made an app and I can preview it in the dev stack, port 4173.
But once the app is mounted in the prod docker stack, I guess nginx takes over, except that none of the paths I tried in the URL returns the app screen.

In the app folder, you can see that the build is in //public/mytodo/ (assets/ has the js, css and fonts files created during the build).
Screenshot from 2025-01-28 12-42-17

It’s not a desktop app.
So what’s the path?

Hi there,

I’m on my phone and not able to look things up easily, but to get you started in the right direction: in a production setup, nginx just as a reverse proxy to frappe, which handles all of its own routing and serving.

You don’t mention how you created this app, but there are a few moving parts. To make your custom page visible to frappe, you need to both make sure it’s in the public folder (like you’ve done here) and also set up a route rule to assign it an endpoint:
https://docs.frappe.io/framework/user/en/python-api/hooks#website-route-rules

I’m a bit fuzzy on how it all works myself, honestly, as I’ve been spoiled by Hussain’s Doppio app, which handles most of the configuration for this stuff cleanly and automatically.

Thank you @peterg

For now, I stay away from doppio which breaks containers because of asset building embeded in doppio commands: How to remove-desk-page? Because everything is broken · Issue #48 · NagariaHussain/doppio · GitHub I had to delete all the stack, including sites and db volumes.
See Frequently Asked Questions · frappe/frappe_docker Wiki · GitHub for details about building assets on containers.

Ah, okay. I missed the word docker in your original post. The docker FAQ suggests why it’s not working, but I don’t personally know enough about how docker works to answer what you should do instead. Hopefully somebody with more docker experience will come along.