17 days ago
Hi Railway Support — I'm having an issue where one Railway service is configured to build ml/Dockerfile, but Railway appears to be building the repository root Dockerfile instead.
The service configuration is:
- Root Directory:
/ - Build:
ml/Dockerfile - Branch:
main - Deploy: none
- Healthcheck:
/v1/model/health
The repository contains both:
/Dockerfile— builds the Go backend/ml/Dockerfile— builds the Python FastAPI ML service
However, the deployment build log starts with:
load build definition from Dockerfile
and then shows the multi-stage Go backend build steps from the root Dockerfile.
The resulting container is therefore running the Go backend, and the healthcheck fails because /v1/model/health is only implemented by the Python ML service.
The ml/Dockerfile is present on the deployed main commit, and the service is explicitly configured to use ml/Dockerfile.
Could you please check why this service is resolving/building the root Dockerfile instead of the configured ml/Dockerfile?
This appears to be a Railway build configuration/service issue rather than an application-code issue.
1 Replies
17 days ago
Your service settings confirm ml/Dockerfile is configured as the Dockerfile path, and the build logs show Go backend build steps (golang base image, go mod download, go build) consistent with the root Dockerfile you described. Try setting the service variable RAILWAY_DOCKERFILE_PATH to ml/Dockerfile, which is the documented method for specifying a custom Dockerfile path. Also check whether a railway.json or railway.toml exists in the repo root, since config-as-code files override dashboard settings.
Status changed to Awaiting User Response Railway • 17 days ago
10 days ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 10 days ago