Golang Monorepo
have anyone deployed a go monorepo successfuly? (I have Hobby plan)
I'm using go workspaces and have multiple services/modules in the root of the project.
In railway I'm trying to create a service for each executable module and setting the
Root Directory
to the corresponding directory.
But that makes it impossible to download/install internal/local modules since the Docker environment (using Dockerfile because I'm using latest go version) is created with only the contents of the directory/service I'm trying to deploy.
The code is deployed from a private github repo, so I'd be annoying to provide the Github Credentials to download the deps when they're already in the repo (aside from the fact that from what I can see on some Go docs, I'd have to specify each local module in an env var)...
Is there any other way to do it? Am I doing unnecesary stuff?Solution:Jump to solution
have a read of this article, it describes how to setup and use private github repos for your go modules https://www.digitalocean.com/community/tutorials/how-to-use-a-private-go-module-in-your-own-project
5 Replies
Project ID:
24f61647-887c-408e-b0bd-3bc80ab0b743
24f61647-887c-408e-b0bd-3bc80ab0b743
Solution
have a read of this article, it describes how to setup and use private github repos for your go modules https://www.digitalocean.com/community/tutorials/how-to-use-a-private-go-module-in-your-own-project
After 20 commits, I made it work.
thx
no problem 🙂