Sveltekit Dockerfile

mrxbox98
HOBBY

a year ago

My sveltekit project requires node v20 so I created a dockerfile for it:

FROM node:20

ARG DATABASE_URL
ARG DIRECT_DATABASE_URL
ARG NEXTAUTH_SECRET
ARG NEXTAUTH_URL
ARG NEXT_PUBLIC_STRIPE_PUBLIC_KEY
ARG PUBLIC_PAYPAL_KEY
ARG PUBLIC_STRIPE_KEY
ARG SECRET_PAYPAL_KEY
ARG STRIPE_SECRET_KEY
ARG PORT
ENV PORT=${PORT}

COPY package.json .
COPY yarn.lock .

RUN yarn install

COPY . .

RUN yarn run prisma generate

RUN yarn build

EXPOSE ${PORT}

ENTRYPOINT ["node", "build"]

I tested on my local system and the dockerfile runs but on railway it says completed and there are no deply logs.

0 Replies

mrxbox98
HOBBY

a year ago

b820c80e-50e9-475a-85c6-89832fccdd8c


a year ago

remove the port stuff from the dockerfile


mrxbox98
HOBBY

a year ago

All the port stuff?


mrxbox98
HOBBY

a year ago

Even the expose?


a year ago

it's not needed


mrxbox98
HOBBY

a year ago

I tried that and same thing happens


mrxbox98
HOBBY

a year ago

completed with no logs


a year ago

what browser are you on? can you see logs from other services you've deployed


mrxbox98
HOBBY

a year ago

Chrome, I can see logs of everything else


a year ago

can you see build logs for this service?


mrxbox98
HOBBY

a year ago

yeah


a year ago

do you have a build or start command set elsewhere like in the service settings, if so, remove them.


mrxbox98
HOBBY

a year ago

Yeah I had a custom start command I used previously that is still there. Should I remove it?


a year ago

yes


a year ago

it would be overwriting the ENTRYPOINT


a year ago

could have unintended side effects


mrxbox98
HOBBY

a year ago

same issue

1252407798847897900


a year ago

are you able to share the repo? im not sure if i could be of further help if im not able to reproduce this


mrxbox98
HOBBY

a year ago

Sure, whats your gh username?


a year ago

brody192


mrxbox98
HOBBY

a year ago

Added


mrxbox98
HOBBY

a year ago

I can also share the railway project if that would help


a year ago

maybe but we will hold off on that for right now


mrxbox98
HOBBY

a year ago

Oh wait im so stupid <:facepalm:1233856975024947351> i removed the custom build command but not the custom start one


mrxbox98
HOBBY

a year ago

it works now


mrxbox98
HOBBY

a year ago

ty for the help


a year ago

well at least i was right haha


a year ago

please dont close posts