creating more than 1 domain under service
i have a service that runs 2 processes at once, that means i need 2 domains under 1 service, but after adding one i dont see an option to add another
39 Replies
Project ID:
e0c71b52-cf71-4d16-b94c-bce42e3db870
e0c71b52-cf71-4d16-b94c-bce42e3db870
i can create multiple custom domains?
of course
thank you, didnt know
how do i got about linking them to a port
you can only expose a single port
so if i have my client on 3000 and my api on 8080 what would i do
run them as separate railway services
the dockerfile provided runs both the client and api at once, if i only serve one port then its running a whole server thats not being used, making me pay more
can you send the dockerfile?
would you like me to send the github repo?
that would be even better
GitHub
GitHub - SnailyCAD/snaily-cadv4: 💻 An open source Computer Aided Di...
💻 An open source Computer Aided Dispatch (CAD) for FiveM, this is a web based integration for communities who love police roleplaying and dispatching. Discord: https://discord.gg/eGnrPqEH7U - GitHu...
have two railway services and set one services root directory to /apps/api and the other to /apps/client
me and the repo owner have been struggling to find a way for this to work, mostly because it depends on docker compose
This sounds to me like they should be in separate services in the same project
i tried earlier
whoops more messages
yeah I agree with brody
and
Dockerfile:8
-------------------
7 |
8 | >>> RUN yarn config set httpTimeout 1200000 && \
9 | >>> npx turbo prune --scope=@snailycad/api --docker && \
10 | >>> yarn install
11 |
-------------------
ERROR: failed to solve: process "/bin/sh -c yarn config set httpTimeout 1200000 && npx turbo prune --scope=@snailycad/api --docker && yarn install" did not complete successfully: exit code: 1
okay then leave the root directory at / for both services and just set the correct start commands in the service settings
ive tried that before but forget what went wrong, trying now
hopefully i can get this working, ive been wanting to make the switch for a while. i have instances of that repo running on a vps that im paying $20+ for and i have to manage updates and random crashes, hopefully if this works i can make a full itme switch
on the vps have you mapped each service to a different domain
on a different sub domain theiugh nginx
the issue was it cant access the packages under /packages
Error: Cannot find module '/app/node_modules/@snailycad/utils/dist/version.js'
at createEsmNotFoundErr (node:internal/modules/cjs/loader:1016:15)
at finalizeEsmResolution (node:internal/modules/cjs/loader:1009:15)
at resolveExports (node:internal/modules/cjs/loader:529:14)
at Function.Module._findPath (node:internal/modules/cjs/loader:569:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:981:27)
at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue (/app/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
at Function.Module._resolveFilename (/app/node_modules/tsconfig-paths/src/register.ts:115:36)
at Function.Module._load (node:internal/modules/cjs/loader:841:27)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18) {
code: 'MODULE_NOT_FOUND',
path: '/app/node_modules/@snailycad/utils/package.json'
}
i recommended fixing that issue before proceeding
you will want to have two separate services for this
this is an issue caused on railway
no its not
?
this would happen on any similar host
your repo is structured incorrectly or setup wrong
it's not mine, but whats wrong with it
i dont know im not a js dev
but ive been using railway for long enough to know that this isnt a platform issue
will i ever be able to expose more than one port on a service
i think its a planned feature, but you really don't need to, you should be running two railway services
when ran on a vps its supposed to be ran in one service under 2 domains, shouldnt it be like that on railway aswell
you can run two services and add your desired domain to each
trust me, that is absolutely the way to go on railway, you can't think of services as vps'es
i tried to do that way and the error above keeps coming up, it isnt working like i said
im not too sure what it is i guess ill get in contact with the repo owner
yeah you would need to make changes to the repo