dockerfile not working

I'm trying to deploy a bun app using Dockerfile. The build steps complete without any issue but then it seems like the app is never actually started, the logs are empty and endpoint responds with a 503. Just for testing i deployed the same application on render and there it worked, but i would prefer to continue using railway. Thanks for helping
9 Replies
Percy
Percy10mo ago
Project ID: 3102686e-c51e-48c6-9ed9-19ccc7a6891e
sirscofield
sirscofieldOP10mo ago
3102686e-c51e-48c6-9ed9-19ccc7a6891e
Brody
Brody10mo ago
send the dockerfile please
sirscofield
sirscofieldOP10mo ago
FROM oven/bun

WORKDIR /usr/src/app
COPY . /usr/src/app

RUN bun install --frozen-lockfile --production

# Set environment variables
ENV GOOGLE_CLIENT_ID=$GOOGLE_CLIENT_ID \
GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET \
OPENAI_API_KEY=$OPENAI_API_KEY \
PINECONE_API_KEY=$PINECONE_API_KEY \
PINECONE_INDEX_NAME=$PINECONE_INDEX_NAME \
CLERK_PUBLISHABLE_KEY=$CLERK_PUBLISHABLE_KEY \
CLERK_SECRET_KEY=$CLERK_SECRET_KEY \
MONGO_URL=$MONGO_URL \
PORT=8080



ENTRYPOINT bun run ./src/index.ts
FROM oven/bun

WORKDIR /usr/src/app
COPY . /usr/src/app

RUN bun install --frozen-lockfile --production

# Set environment variables
ENV GOOGLE_CLIENT_ID=$GOOGLE_CLIENT_ID \
GOOGLE_CLIENT_SECRET=$GOOGLE_CLIENT_SECRET \
OPENAI_API_KEY=$OPENAI_API_KEY \
PINECONE_API_KEY=$PINECONE_API_KEY \
PINECONE_INDEX_NAME=$PINECONE_INDEX_NAME \
CLERK_PUBLISHABLE_KEY=$CLERK_PUBLISHABLE_KEY \
CLERK_SECRET_KEY=$CLERK_SECRET_KEY \
MONGO_URL=$MONGO_URL \
PORT=8080



ENTRYPOINT bun run ./src/index.ts
I tired a bunch of different versions and none of them worked
Brody
Brody10mo ago
try changing ENTRYPOINT to CMD
sirscofield
sirscofieldOP10mo ago
unfortunately it didn't help. The strange thing is, that there are no logs, even tho the server should do some logs as soon as it starts. So i guess for some reason its just not started
Brody
Brody10mo ago
does your deployment list as active?
sirscofield
sirscofieldOP10mo ago
yes, but when i click the link i get the "Application failed to respond" error
Brody
Brody10mo ago
are you listing on host 0.0.0.0 and the environment variable PORT?
Want results from more Discord servers?
Add your server