R
Railway•13mo ago
shixzie

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:
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
Jump to solution
5 Replies
Percy
Percy•13mo ago
Project ID: 24f61647-887c-408e-b0bd-3bc80ab0b743
shixzie
shixzieOP•13mo ago
24f61647-887c-408e-b0bd-3bc80ab0b743
Solution
Brody
Brody•13mo ago
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
shixzie
shixzieOP•13mo ago
After 20 commits, I made it work. thx
Brody
Brody•13mo ago
no problem 🙂
Want results from more Discord servers?
Add your server