Running 3 different apps
mparisi76
HOBBYOP

8 months ago

Hello. I am wanting to run 3 different applications using Railway, a Medusa backend, a Vendor admin front end, and a customer facing storefront, all using the same domain. What is the recommended way to accomplish this? I tried setting all 3 up in the same service, however, I'm not able to use the domain for all 3. Do I need to create a new project for each? Thank you.

Solved$10 Bounty

Pinned Solution

alexwebgr
HOBBY

8 months ago

i assume they are 3 components that make up one app, right?

do they live in separate git repos?

i assume your Vendor admin front end, and a customer facing storefront need to talk to the Medusa backend

if my assumptions are correct you can create three services in the same project from the 3 repos and connect the frontends to the backend by using the internal url that doesn't incur egress charges.

Then via a Generated domain you can access the customer storefront to see that it is working.

As a next step you need to set up a Custom Domain for your storefront www.myshop.com and then set up a subdomain admin.myshop.com for the admin

4 Replies

mparisi76
HOBBYOP

8 months ago

eff4fdbb-16e0-4ffb-bee2-4ad13f2f307e


elcapitan88
PRO

8 months ago

you could have them in the same project. You would just have to create subdomains for each of the service. so for instance your backend would be api.yourapp.com then the store would be yourapp.com. the admin would be admin.yourapp.com


wangxuedong
PRO

8 months ago

Typically, in the current microservice architecture, it is usually done by directly accessing a single front-end service, which is routed by the front-end and then distributed to the designated microservice backend through the Gateway.

However, for the scenario you described, I suggest that you can deploy another service to customize the reverse proxy service, such as the nginx container.

And bind your main domain name for this reverse proxy service. All network entrances and exits will be forwarded through here.

Hope it can be of some help to you.


alexwebgr
HOBBY

8 months ago

i assume they are 3 components that make up one app, right?

do they live in separate git repos?

i assume your Vendor admin front end, and a customer facing storefront need to talk to the Medusa backend

if my assumptions are correct you can create three services in the same project from the 3 repos and connect the frontends to the backend by using the internal url that doesn't incur egress charges.

Then via a Generated domain you can access the customer storefront to see that it is working.

As a next step you need to set up a Custom Domain for your storefront www.myshop.com and then set up a subdomain admin.myshop.com for the admin


Status changed to Solved chandrika 8 months ago


Loading...