Critical: Dockerfile detection fails in monorepo subdirectory

atbreb
PROOP

a month ago

We are experiencing a critical deployment block. Railway fails to detect a Dockerfile located in a monorepo subdirectory, even when the Root Directory setting is correctly configured.

This appears to be a Railway platform bug, as the exact same Dockerfile builds correctly when moved to the repository root.

Repository and Service

  • Repository: https://github.com/atbreb/taylor-yves

  • Service: Kong API Gateway

  • Project / Service ID: [Please fill in from your dashboard]

The Core Problem

We have a service with its Dockerfile at apps/kong/Dockerfile.

Failing Configuration

  • Root Directory: apps/kong

  • Expected: Railway detects Dockerfile in the root (apps/kong/).

  • Actual Error: Dockerfile 'Dockerfile' does not exist

Working "Workaround" Configuration

  • Branch: railway-kong-root-workaround (Commit: 90b9c6e)

  • Action: Moved apps/kong/Dockerfile to the repository root (/Dockerfile).

  • Root Directory: (empty)

  • Result: This works. The Dockerfile is detected, and the build starts.

This test confirms the Dockerfile itself is valid, and the issue is specific to Railway's detection within the apps/kong subdirectory.

Core Questions

  1. Why does Railway fail to detect apps/kong/Dockerfile when the Root Directory is set to apps/kong?

  2. Why did Dockerfile detection work for apps/web and apps/api subdirectories, but not for apps/kong?

  3. Is there a known bug or a specific configuration we are missing for this monorepo structure?

Any help is appreciated. Thanks in advance.

Solved

3 Replies

Railway
BOT

a month ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


a month ago

Hello,

If you would like to set a custom Dockerfile path please do so with the RAILWAY_DOCKERFILE_PATH variable.

Best,
Brody


Status changed to Awaiting User Response Railway 29 days ago


atbreb
PROOP

a month ago

That worked, thank you!


Status changed to Awaiting Railway Response Railway 29 days ago


Status changed to Solved brody 29 days ago


Loading...