2 months ago
while deploying this error is coming
Attachments
7 Replies
2 months ago
Hey there! We've found the following might help you get unblocked faster:
🧵 Docker build context completely empty when using UI-configured Dockerfile path
🧵 Subject: Issue Deploying FastAPI Backend on Railway with Docker
If you find the answer from one of these, please let us know by solving the thread!
2 months ago
No
2 months ago
I resolved it like this i've to forcefully create a dockerfile at api/Dockerfile like this below then it also railway.toml file [build]
builder = "DOCKERFILE"
[deploy]
restartPolicyType = "ON_FAILURE"
restartPolicyMaxRetries = 10
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 5060
CMD ["npm", "start"]
2 months ago
You had your root directory set to /api and your builder set to "DOCKERFILE" so we looked for a Dockerfile at /api/Dockerfile.
Status changed to Awaiting User Response Railway • 2 months ago
2 months ago
Good to hear you solved it, but Railway normally won't try to use a non-existant Dockerfile if you didn't configure it yourself. Do you have any root directories configured in Service > Settings > Source?
Attachments
Status changed to Awaiting Railway Response Railway • 2 months ago
brody
You had your root directory set to /api and your builder set to "DOCKERFILE" so we looked for a Dockerfile at /api/Dockerfile.
2 months ago
oh i see, I just checked you're right builder was set for the "DOCKERFILE"
Attachments
Status changed to Solved brody • 2 months ago