a month ago
Environment
Monorepo Type: Turborepo with Bun
Project Structure: Multi-service monorepo with shared packages
CLI Version: Latest Railway CLI
Deployment Method: railway up command and via GitHub
Project Structure
.
├── apps/
│ ├── backend/
│ ├── dex-monitor/ # Service I'm trying to deploy
│ │ ├── Dockerfile
│ │ ├── package.json
│ │ └── src/
│ ├── dex-bot/
│ └── … (7 more apps)
└── packages/ # Shared workspace packages
├── api-sdk/
├── dex-engine/
├── logger/
└── … (10 more packages)
Issue Description
I'm attempting to deploy a single service (apps/dex-monitor) from my monorepo that depends on shared packages in packages/*. The build consistently fails with a dockerfile path error.
Configuration Attempted
Dashboard Settings:
Builder: Dockerfile
Dockerfile Path: apps/dex-monitor/Dockerfile (no leading slash)
Commands Tried:
Command 1
railway up --service dex-monitor
Command 2
railway up --service dex-monitor --dockerfile apps/dex-monitor/Dockerfile
## Build Error Outputscheduling build on Metal builder "builder-ghemuq"
[snapshot] receiving snapshot, complete 12 MB [took 3.107177548s]
[snapshot] unpacking archive, complete 15 MB [took 147.073458ms]
internal
load build definition from /apps/dex-monitor/Dockerfile
0ms
Build Failed: bc.Build: failed to solve: failed to read dockerfile: open /apps/dex-monitor/Dockerfile: no such file or directory
0 Replies
a month ago
Are you using a root directory?
a month ago
No railway.json present?
a month ago
🤨
a month ago
Can you share the GitHub URL?
a month ago
Oh.
a month ago
That's a root directory
a month ago
Yeah so, just set the Dockerfile directory to be Dockerfile
a month ago
It's looking for /apps/dex-monitor/apps/dex-monitor/Dockerfile
a month ago
Which is not what you want 😃
ohh i get it now
was prev removed the /apps/dex-monitor …
and now its redeploying
a month ago
That doesn't look like it failed
a month ago
Can you screenshot the whole sidebar please
a month ago
I just need to see what's between those two
a month ago
Hmm
a month ago
What does it say in details?
a month ago
You're right I expected more between those two things
a month ago
😭 what
a month ago
is the repository public
a month ago
Can you disable metal build environment then redeploy?

or might there me smthn wrong with my Dockerfile?
============================
Base image
============================
FROM oven/bun:latest AS base
RUN apk add --no-cache dumb-init
WORKDIR /app
RUN addgroup -g 1001 -S appgroup \
&& adduser -S appuser -u 1001 -G appgroup \
&& chown -R appuser:appgroup /app
============================
Dependencies stage
============================
FROM base AS deps
WORKDIR /app
Copy package files
COPY --chown=appuser:appgroup package.json bun.lockb* ./
Copy only the packages we need (adjust based on your actual dependencies)
COPY --chown=appuser:appgroup packages/logger ./packages/logger
COPY --chown=appuser:appgroup packages/notifier ./packages/notifier
COPY --chown=appuser:appgroup packages/shared ./packages/shared
COPY --chown=appuser:appgroup packages/tokens ./packages/tokens
COPY --chown=appuser:appgroup packages/typescript-config ./packages/typescript-config
Copy dex-monitor app
COPY --chown=appuser:appgroup apps/dex-monitor/package.json ./apps/dex-monitor/package.json
Install all dependencies
RUN bun install --frozen-lockfile
============================
Build stage
============================
FROM base AS builder
WORKDIR /app
Copy installed dependencies
COPY --from=deps --chown=appuser:appgroup /app/nodemodules ./nodemodules
COPY --from=deps --chown=appuser:appgroup /app/packages ./packages
Copy app source
COPY --chown=appuser:appgroup apps/dex-monitor ./apps/dex-monitor
COPY --chown=appuser:appgroup package.json bun.lockb* ./
Prune dev dependencies
RUN bun install --frozen-lockfile --production
============================
Production stage
============================
FROM base AS production
WORKDIR /app
ENV NODE_ENV=production \
PORT=3000
Copy production dependencies
COPY --from=builder --chown=appuser:appgroup /app/nodemodules ./nodemodules
COPY --from=builder --chown=appuser:appgroup /app/packages ./packages
COPY --from=builder --chown=appuser:appgroup /app/apps/dex-monitor ./apps/dex-monitor
COPY --from=builder --chown=appuser:appgroup /app/package.json ./
USER appuser
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --quiet --spider http://localhost:3000/health || exit 1
ENTRYPOINT ["dumb-init", "--"]
CMD ["bun", "run", "apps/dex-monitor/src/index.ts"]
a month ago
Your dockerfile path is incorrect
a month ago
Oh. Nice.
a month ago
AI generated? 🤨
a month ago
Okay, can you share your directories and root directory now
on a second thought, yh 🥲
is there smthn wrong w it? i had someone vet it tho, would appreciate your insights on it 😭
dexion/
├── apps/
│ └── dex-monitor/
│ └── Dockerfile
| | other apps/services im gonna deploy with railway
└── packages/

a month ago
.
a month ago
when you click on Dockerfile Path it should pop up and suggest where it is
a month ago
thats the right way to do it
a month ago
Bleuh
a month ago
once setting redeploy
@Sam said this resolves to /apps/dex-monitor/apps/dex-monitor… because of the root dir

a month ago
Yeah I’m 99% sure that should just be Dockerfile or even try setting it to nothing
a month ago
Railway should automatically pick up on it
a month ago
Nope what I suggested is correct
a month ago
you have no error logs
a month ago
<:sadcat:1408269791965478932>
a month ago
That’s confusing
a month ago
Bountied so the community could help
a month ago
I'm sure the community can help!
a month ago
Just random bots on the internet
a month ago
It’s fine to ignore
a month ago
!s
Status changed to Solved samgordon • about 1 month ago
a month ago
:(










