R
Railway8mo ago
Ayush

Build Projects from Different Dockerfiles

Hi guys, Quick question - is it possible to build multiple different projects from dockerfiles that exist in the same directory? Given the following folder structure:
.
└── src/
└── server/
├── Dockerfile
├── Dockerfile.test
├── Service/
├── Domain/
└── API/
.
└── src/
└── server/
├── Dockerfile
├── Dockerfile.test
├── Service/
├── Domain/
└── API/
My API project is successfully building in railway. The root directory is configured as "/src/server/" . My Service project however is not building (same root directory configuration as above) when trying to target Dockerfile.test which i specified as a service variable: RAILWAY_DOCKERFILE_PATH=Dockerfile.test any ideas on what im doing wrong? Perhaps im misunderstanding this guide: https://docs.railway.app/guides/dockerfiles
Solution:
i think you want RAILWAY_DOCKERFILE_PATH=/src/server/Dockerfile.test
Jump to solution
5 Replies
Percy
Percy8mo ago
Project ID: 71e9ecca-8ad5-42c6-8450-e3b64ec2edab
Ayush
Ayush8mo ago
71e9ecca-8ad5-42c6-8450-e3b64ec2edab build error for my service project:
[Region: us-west1]
Dockerfile `Dockerfile.test` does not exist
[Region: us-west1]
Dockerfile `Dockerfile.test` does not exist
Solution
Brody
Brody8mo ago
i think you want RAILWAY_DOCKERFILE_PATH=/src/server/Dockerfile.test
Ayush
Ayush8mo ago
Ah thanks Brody that was it! I thought configuring the root directory would have me covered there. Thanks again for your time 😃
Brody
Brody8mo ago
i know, its odd
Want results from more Discord servers?
Add your server