As long as all the code your Golang application is using is contained within the repository you are deploying, then there’s absolutely nothing for you to do. For everything else, let’s walk through it in this guide!
If you use private external dependencies, then we have three solutions.
Vendoring all your dependencies is the simplest approach. The setup steps are already detailed in the faster builds guide, please check it out!
Using your own vendor
directory completely avoids the need for any tokens and additional configuration via GOPRIVATE
or with a custom GOPROXY
. This is our preferred approach.
To handle private dependencies, set GOPRIVATE
and GIT_TOKEN
so Runway’s builder knows about them:
runway app config set \
GOPRIVATE=https://github.com/org/lib \
GIT_TOKEN=your-personal-access-token
[build]
[[build.env]]
name="GOPRIVATE"
value="https://github.com/org/lib"
[[build.env]]
name = "GIT_TOKEN"
value = "your-personal-access-token"
GOPRIVATE=https://github.com/org/lib,https://gitlab.com/org/lib2
, wildcards (https://git.example.org/project/*
) are supported as well.The token is a critical subject: we recommend to set the GIT_TOKEN
via runway app config set
, and only set GOPRIVATE
in project.toml
if the file is your preferred way of maintaining build related configuration.
runway config set
. The transport is encrypted by SSL/TLS and the database is encrypted as well. The drawback is: the GIT_TOKEN
will be added to your application’s runtime environment.You can run your own go-proxy and handle private modules outside of the Runway build process:
runway app config set \
GOPROXY=https://username:token@your-proxy.com,direct
[build]
[[build.env]]
name = "GOPROXY"
value = "https://username:token@your-proxy.com,direct"