How can I integrated a nodejs application within my ghost?

Basically I want to integrate a stripe checkout of my products.

For that I need to have a nodejs app running. I’m wondering if I can do that within my ghost or do I have to setup a separate nodejs app?

For development I’m using ghost local.
For my live site I’m using dockerized ghost.

Right now the only way I can see this working is by creating a new docker container with nodejs running and proxying the nodejs app to my domain with a location (/create-checkout-session)

But it would be cleaner if I could integrate it in my already existing ghost app.

Is there a way to do this? And if so, please let me know how.

Ghost already has built-in Stripe integration including one-off payments. What features are missing for you?

Ghost is meant to be extended with external apps and API calls, so you’ve got the right idea by running a separate app in a different container.

You could modify Ghost’s code directly, but then you’d be going down the path of a fork of Ghost, which is likely to be painful.

I’m planning on creating a shopping cart system in Javascript and passing on the price API ID’s of the products of Stripe through a post form to then redirect to a one time payment on the stripe hosted page. Can this be done within ghost? If so please let me know what I need.
If this isn’t possible, I’ll create a separate docker container, I don’t really want to create a fork of Ghost

Ghost just has simple subscriptions and one off payments. I’m not aware that it has a shopping cart feature.

No it doesn’t have a shopping cart feature, I’m gonna code that myself. But is there a way to pass on the price API ID’s somehow? If so I wouldn’t need a separate nodejs container

Putting data into a POST request could be done with JavaScript via a template. And you could store state in a cookie.