R
Railway10mo ago
Noricane

New to docker etc. help with running custom start command.

Hello, the real issue I'm dealing with is importing a private github repo to my golang project. And from some googling I've found that fine-grained tokens + setting a git global variable with credentials before anything runs is the key. However I can't seem to find how to run these commands before the app starts. I'd like to keep the build process identical and the start process identical. I'd just like to add the authorization to my app so the private packages are available in the executable.
10 Replies
Percy
Percy10mo ago
Project ID: N/A
Noricane
NoricaneOP10mo ago
N/A
Brody
Brody10mo ago
this would likely be achieved easily with a dockerfile based build
Noricane
NoricaneOP10mo ago
Anywhere u can point me to? I'd honestly just like to copy paste the default dockerfile and add my lines.
Brody
Brody10mo ago
thats not quite how railway works, but there would be plenty of great golang dockerfile resources online!
Noricane
NoricaneOP10mo ago
Isn't there a security aspect to this though? Adding an access token to a dockerfile seems a bit naive from a security aspect?
Brody
Brody10mo ago
oh no you would never do that, you would use environment variables
Noricane
NoricaneOP10mo ago
Ahh my bad lol, thanks xD Are u aware if symlinking the github repo inside my project is a possible solution? Instead of importing it idiomatically. I just want the code to be available in two projects and both projects are private repos as well as the one I'm trying to share
Brody
Brody10mo ago
I have no clue, but it can't hurt to try
Noricane
NoricaneOP10mo ago
I'll check, thanks for the input Brody.
Want results from more Discord servers?
Add your server