manzanit0
Migrating to nixpacks on a monorepo with multiple services
Hey, I'm currently trying to migrate to nixpacks due to the deprecation of Heroku buildpacks, but I'm finding the migration as smooth as hoped.
I have a fairly standard Go monorepo with the classic
cmd
, pkg
folders and what not. In the cmd
I have multiple services, each deployed to railway as a separate service.
I managed to eventually migrate each individual one to nixpacks by overriding the build command to something like: go build -o bin/bot ./cmd/bot
. However, I'd like to specify these commands in a configuration file so it's not hardcoded in the railway dashboard.
I've found that you have some documentation on how to do this through the nixpacks.toml file, or through the environment variables such as NIXPACKS_BUILD_CMD
. I haven't really found in the documentation how to leverage the configuration files for a monorepo with multiple services. Do you have any resources around this?9 replies