10 months 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
66 Replies
10 months ago
Are you using a root directory?
10 months ago
No railway.json present?
10 months ago
🤨
10 months ago
Can you share the GitHub URL?
10 months ago
Oh.
10 months ago
That's a root directory
10 months ago
Yeah so, just set the Dockerfile directory to be Dockerfile
10 months ago
It's looking for /apps/dex-monitor/apps/dex-monitor/Dockerfile
10 months ago
Which is not what you want 😃
ohh i get it now
was prev removed the /apps/dex-monitor ...
and now its redeploying
10 months ago
That doesn't look like it failed
10 months ago
Can you screenshot the whole sidebar please
10 months ago
I just need to see what's between those two
10 months ago
Hmm
10 months ago
What does it say in details?
10 months ago
You're right I expected more between those two things
10 months ago
😭 what
10 months ago
is the repository public
10 months 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/node_modules ./node_modules
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/node_modules ./node_modules
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"]
10 months ago
Your dockerfile path is incorrect
10 months ago
Oh. Nice.
10 months ago
AI generated? 🤨
10 months 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/

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

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










