14 days ago
I have a new python project set up using uv workspaces.
This means I have a repo that looks something like this:
.
├── core
│ ├── pyproject.toml
│ ├── src
│ └── uv.lock
├── mcp_server
│ ├── pyproject.toml
│ └── src
├── pyproject.toml
├── README.md
├── shared
│ ├── pyproject.toml
│ └── src
└── uv.lock
This works fine locally, but with Railway the build command it uses needs to be changed to support the workspace. With the default:
uv sync --locked --no-dev --no-install-project
We get the error:
The lockfile at `uv.lock` needs to be updated, but `--locked` was provided. To update the lockfile, run `uv lock`.
I believe this is because it is not installing the dependencies for all packages and so it is a changed list. In theory we could change the build command, but that doesn't seem to be working for me? i.e. I've tried changing the "Custom build command" to this, but it seems to be complete ignored.
Has anyone got this working?
4 Replies
14 days 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!
13 days ago
Use custom dockerfile
Remove --locked so railway can auto update
8 days ago
I had to set my docker file via env variable then have a small toml in each sub directory/service. then i had to run railway up --service xyz. https://docs.railway.com/guides/dockerfiles#custom-dockerfile-path
It was quite a journey to get there.
8 days ago
Thanks! I managed to get this working by switching from Railpack to Nixpacks and then my custom build command was used in the build.
Status changed to Closed brody • 2 days ago